PDA

View Full Version : Browser can't read my Formmail .php script



wardw
10-05-2009, 03:22 PM
I have a formmail.php script in my own cgi-bin directory, for sending me an email containing my form data. When I submit my form, whose "action" points to the php script (action="../cgi-bin/formmail.php"), a browser alert appears saying "You have chosen to open formmail.php....What should Firefox do with this file?" The email is not sent to me.

I'm using version 8.16 of the script. Permissions on the cgi-bin directory and the formmail.php file are both 755. I have a .htaccess file in the directory that says "AddHandler x-httpd-php5 .php". I suspect the server is not carrying out the script instructions. Should I put the php script and the .htaccess file in some other cgi-bin directory?

wardw
10-07-2009, 10:09 AM
I asked Bluehost support about this. Their reply was:

You are having this issue because of this line in your cgi-bin/.htaccess file:

AddHandler x-httpd-php5 .php

This is not a valid handler. you will need to replace that line with this:

AddHandler application/x-httpd-php5s .php

I replaced the line and now I'm getting another error, but at least the .php script is being recognized.