1830241 Members
1630 Online
109999 Solutions
New Discussion

Re: php and apache ....

 
K.C. Chan
Trusted Contributor

php and apache ....

All,
I want to run php script under cgi-bin. But it only execute under html dir; It seems like it using the DocumentRoot setting as it's default dir for executing php scripts. Does any one have any idea how to set it up so it runs under cgi-bin. Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
1 REPLY 1
Muthukumar_5
Honored Contributor

Re: php and apache ....

Do you have cgi load module configured with httpd.conf file as,

LoadModule cgi_module modules/mod_cgi.so

scriptalias configuration as,

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options None
Order allow,deny
Allow from all


Create directory of /var/www/cgi-bin as,

drwxr-xr-x 2 root root 4096 Sep 25 2003 /var/www/cgi-bin/

hth.
Easy to suggest when don't know about the problem!