[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache2 with PHP as CGI



Stephen Le wrote:

I'm having some difficultly running PHP4 scripts as CGI with Apache2.
I've installed the php4-cgi package and followed the instructions in
/usr/share/doc/php4-cgi/README.Debian.gz, and uncommented the
following line in my apache.conf:
AddType application/x-httpd-php .php

>>[snip]

Roberto C. Sanchez wrote:
Is your script executable?  I think the script needs to be executable if
you are using it as CGI.

There is a CGI troubleshooting guide here:

http://thecsl.org/wiki/doku.php?id=idiotsguidetosolvingperlcgiproblems

If you replace the word "perl" with "/usr/bin/php4-cgi" it might be helpful to you. --If it is not perhaps you when find the answer, you might update the page to be helpful.

Also, (sorry if this is obvious) but you do have a shbang

	#!/usr/bin/php4-cgi

at the top of your scripts ?





Reply to: