Forum

Cannot execute PHP scripts in subdirectories

Tito
26 September 2010, 21:04
Hi there,

For some reason, I get 500 Internal Server Error when trying to access any PHP file in a subdirectory. Let's say my Virtual Directory points to /var/www/test. Everything works fine within the directory test, but if I call a /var/www/test/dir/index.php, that gives me the error.

No logs are generated when hit that page neither on the general log nor the Virtual Directory log.

I also tried to ad a specific Directory permission section like this, but no luck either.
Directory {
Path = /var/www/test/dir
ExecuteCGI = yes
}

Regards,
Tito

Hiawatha version: 7.3
Operating System: Ubuntu 10.04
Hugo Leisink
28 September 2010, 11:12
Are you sure it's Hiawatha who is generating the 500 error, and not the index.php script in your 'dir' directory?
Tito
30 September 2010, 22:53
You are right, Hugo! Thanks for the hint.

However, I used to get PHP error messages in my webpage. Now, instead, I get the 500 Internal Server Error instead. The only way to debug is to use php-cli. How can I get my PHP errors back instead?

I guess it is a php-fcgi question, not Hiawatha :/

Thanks!
Tito
Hugo Leisink
1 October 2010, 07:41
Try using the following PHP setting (in php.ini):
cgi.rfc2616_headers = 1

or otherwise the following Hiawatha setting:
TriggerOnCGIstatus = no
(see the Hiawatha manual)
This topic has been closed.