Jump to content

Can't get errors on 5.1.6


Recommended Posts

Hi, 

 

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. 
 
-Jim
 
Link to comment
https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/
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.

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.

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.