Jump to content

Can't get errors on 5.1.6

Recommended Posts



I'm working on a server with an old (5.1.6) version of php.  It's run using cgi in apache.  


Currently, I can't get any errors to display from a script.  I've added these lines in my .htaccess:


php_value log_errors 1
php_value error_log /path/user/pages/__jr/php-error.log
php_value display_errors 1
php_value display_startup_errors 1
and phpinfo shows that these values are being set correctly.  However, running a script with a syntax error just displays a blank screen, and no log file is created.  Even if I create the log file with all permissions, nothing gets logged.  
Any ideas on how to get this working?  I just want some way to see what's wrong with a script. 
Link to comment
Share on other sites

Have a look at the Apache Error/Access logs. If I remember correctly, you can only set PHP flags/values in the .htaccess if you are running PHP as an Apache module. Those settings are throwing an Apache 500 error.


If you are going to use CGI, change the setting in the php.ini file.

Link to comment
Share on other sites

Are you sure it is running as CGI?


Make sure that the user running the webserver has write access to the log directory, so it can create the log file.


Again, check the Apache error and access logs to see if it is reporting any errors there.

Link to comment
Share on other sites

  • 2 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.