View Full Version : httpencode error...

10-Jan-2007, 08:12 AM
Hey, man. Can't seem to get formencoder to work. 'encode' doesn't work (status 127). And 'httpencode' not working too. Help needed.

Here's the error msg:-
The following error occurred in FormMail :
Error=Filter "httpencode" cannot open file "/home/httpd/vhosts/thetrendhotel.com.my/cgi-bin/afmabizpub.txt": failed to open stream: Operation not permitted

10-Jan-2007, 09:19 AM

There are two likely causes:

You haven't uploaded the right fmencoder file for your operating system
You haven't entered the correct path names in the FILTERS or SOCKET_FILTERS configuration.Can you open the fmencoder from your browser? If it's correctly installed you should see the message "GET method not implemented". Otherwise, fix that first.

It's best to use the FILTERS setting rather than SOCKET_FILTERS. You only use SOCKET_FILTERS if your PHP refuses to execute programs.

So, get the paths correct and set $FILTERS correctly, and use "encode".

Let me know how you go with the above.

10-Jan-2007, 10:12 AM
Hey, thanks for the quick feedback!

Anyway, i couldn't get any of the fmencoder to work. Here's the error msg:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error. More information about this error may be available in the server error log'

What to do now?

10-Jan-2007, 12:11 PM

This happens using the following URL, correct?

Check that the mode of the file is rwxr-xr-x (mode 755).

If that doesn't work, then you'll need to contact your hosting provider to ask them why. They may need to reconfigure your server to allow it to execute programs.

It's important to verify that you've uploaded the right binary for your server's operating system. Do you know what operating system your server runs?

10-Jan-2007, 02:06 PM

I try to install fmencoder to my other server and it ok since I got this msg
GET method not yet implemented when run from browser but now I got this error
The following error occurred in FormMail :
Error=Cannot chdir to "home/httpd/vhosts/azmarinecentre.com/httpdocs/cgi-bin" to run filter "encode": SAFE MODE Restriction in effect. The script whose uid is 10054 is not allowed to access /home/httpd/vhosts/azmarinecentre.com/httpdocs owned by uid 0

(User data suppressed for security purposes. )

Pls help

10-Jan-2007, 09:01 PM

That's good, you're making progress.

Cannot chdir to "home/httpd/vhosts/azmarinecentre.com/httpdocs/cgi-bin" to run filter "encode": SAFE MODE Restriction in effect.
This means that your PHP installation has SAFE MODE on. SAFE MODE is an annoying feature that prevents things from working.

You should be able to switch it off, and you'll need to ask your hosting provider how you can do that.

It usually involves adding this to your .htaccess file:

php_admin_value safe_mode 0

17-Jan-2007, 01:58 PM

Can i upload the key file in another directory? since i got this feedback from my hosting com "typically only cgi or pl files can reside in the cgi-bin dir. You have to put your html, txt, image files in the /httpdocs dir. You may need to edit the cgi file that calls out the paths." since currently I'm getting this error

The following error occurred in FormMail :
Error=Filter "httpencode" cannot open file "/home/httpd/vhosts/thetrendhotel.com.my/cgi-bin/
afmabizpub.txt": failed to open stream: Operation not permitted

But when i try to put it in another directory i'm getting this error

Fatal error: Maximum execution time of 30 seconds exceeded in /home/httpd/vhosts/thetrendhotel.
com.my/httpdocs/formTmail.php on line 8240

How to check whether they key file is correctly upload to the folder? Currently i'm still using the httpencode coz i'm still negotiating with my hosting com to turn off the safe mode.

pls help

17-Jan-2007, 10:20 PM

Yes you can put the key file in any folder/directory.

Put it in the httpdocs directory and open it with a browser. That proves that it is there and accessible from the web.

Then, just set the "file" attribute of httpencode to be the full path to the key file, change:



Because it's a public key, there's no problem with it being readable by everyone - that's what RSA (public key encryption) is all about.

If you're still having trouble, you might want to run the test script which proves whether your server allows PHP to open URLs (which is what it needs to do for httpencode). It's called testurlopen, and you'll find it attached to a post on this thread:

19-Jan-2007, 01:56 PM

I have run the test for urlopen but I got this error

PHP version is: 4.3.2
Safe mode is: On (this is usually bad)
URL open failed: failed to open stream: no suitable wrapper could be found.

Is it has to do with server problem? any way to fix this?

19-Jan-2007, 11:02 PM

Ok, so PHP can't run the encoder on the server directly (because of SAFE MODE) and it can't open URLs.

It's a very disabled PHP.

There are really only two options:

Ask your hosting provider to resolve the issue (there's absolutely no reason a PHP should be prevented from opening URLs).
Find a better hosting provider.