Hello everyone,
I have recently installed Apache and PHP packages on my computer. I am trying to run php as CGI. I have added all the right configration directives to httpd.conf file. But I am unable to get the php engine working with apache. I have tried so many things, but I keep getting the same error. It seems many people get this eror initially. I have even copy-pasted someone's code but it still doesn't work (works on his computer). I have spent so much time figuring out this and also tried so many different installations of Apache, that I am thinking of installing a different web server altogether. But I still would like toknow what is going wrong. This is what I put in my httpd.conf file:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php3 .php3
Action application/x-httpd-php3 "/php/php.exe"
The location of files and setup also looks right. I get these errors.
With url Internal Server Error
Logs: C:/php/test.php is not executable; ensure interpreted scripts have "#!" first line
Bad file descriptor: don't know how to spawn child process: C:/php/test.php
With url 404 Page Cannot be found
logs: Invalid URI /dev/test.php
Anyone has any ideas what is going wrong and if possible could you please recommend a solution.
Regards,
Sam
I have recently installed Apache and PHP packages on my computer. I am trying to run php as CGI. I have added all the right configration directives to httpd.conf file. But I am unable to get the php engine working with apache. I have tried so many things, but I keep getting the same error. It seems many people get this eror initially. I have even copy-pasted someone's code but it still doesn't work (works on his computer). I have spent so much time figuring out this and also tried so many different installations of Apache, that I am thinking of installing a different web server altogether. But I still would like toknow what is going wrong. This is what I put in my httpd.conf file:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php3 .php
AddType application/x-httpd-php3 .php3
Action application/x-httpd-php3 "/php/php.exe"
The location of files and setup also looks right. I get these errors.
With url Internal Server Error
Logs: C:/php/test.php is not executable; ensure interpreted scripts have "#!" first line
Bad file descriptor: don't know how to spawn child process: C:/php/test.php
With url 404 Page Cannot be found
logs: Invalid URI /dev/test.php
Anyone has any ideas what is going wrong and if possible could you please recommend a solution.
Regards,
Sam