jimr451 Posted November 5, 2013 Share Posted November 5, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/ Share on other sites More sharing options...
DavidAM Posted November 5, 2013 Share Posted November 5, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/#findComment-1457053 Share on other sites More sharing options...
jimr451 Posted November 5, 2013 Author Share Posted November 5, 2013 Ok, I'll try that - funny thing is that phpinfo seems to reflect the changes being made in .htaccess, but it doesn't modify the output at all. -jim Quote Link to comment https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/#findComment-1457082 Share on other sites More sharing options...
DavidAM Posted November 5, 2013 Share Posted November 5, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/#findComment-1457103 Share on other sites More sharing options...
requinix Posted November 5, 2013 Share Posted November 5, 2013 If you're unsure about the permissions, try creating the log file in /tmp where everyone has write access. Quote Link to comment https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/#findComment-1457104 Share on other sites More sharing options...
mac_gyver Posted November 6, 2013 Share Posted November 6, 2013 i'm going to guess error_reporting is set to a 0, so php detected errors are not being reported. i'm also guessing php is running as an apache module. try adding the following to your .htaccess - php_value error_reporting -1 Quote Link to comment https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/#findComment-1457127 Share on other sites More sharing options...
coffeecup Posted February 4, 2014 Share Posted February 4, 2014 I am currently reading the ini file for 5.4.4 and there are cgi directives mid way down. Quote Link to comment https://forums.phpfreaks.com/topic/283616-cant-get-errors-on-516/#findComment-1467663 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.