Hi, I've just installed PHP as a cgi-binary. I've gotten this to work at the command line prompt without any problems. However for some strange reason, I can't get any PHP pages to show up in the browser. They just try to open/save.
Does anyone know what I have to do (probably to my httpd.conf in Apache) to get PHP scripts to run, even though they are installed as a CGI-binary?
i neva insteled PHP as a cgi but iv always found the PHP install.txt quite good and easy to follow.
If you wish to install PHP as a CGI binary, (the sapi is much better)
you need to enable the apache security fix in your php.ini by
setting cgi.force_redirect = 1. Then, insert these lines to your conf file:
Please note that you cannot use php-cli.exe with your webserver. You have
to use php.exe which can be found in the sapi directory of your
Note, we consider installing PHP like this suicidal.
As a further precaution, we recommend you change the "/php/"
ScriptAlias to something more random, to prevent any attempts to
call your binary (like the Code Red scripts) for returning a response
other than 404.
Yes, I don't like this installation either. But this is an in house development only thing, and also, our Apache build is complaining about aspx. They don't want to fix this so they just installed it as a CGI binary.
However, they failed to get it to run in the browser. Oh, btw, I'm using Linux, so is there differenting things I need to add to httpd.conf ?