Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

My server's error log (in cPanel) has an entry for every single time a PHP page is loaded that looks like this (where 'username' has been substituted for my actual username):

[2012-06-09 09:02:07]: info: [usr/grp]: username/username cmd: /home/username/public_html/error.php php: /usr/local/php53/bin/php

I know it's only an 'info' message but it's filling up my error log. It can't be related to the content of my PHP files because it even happens when I load a page with this as its content:

<?php phpinfo(); ?>

Any ideas on what it means or if I can get rid of it?

share|improve this question
add comment

2 Answers

up vote -2 down vote accepted

To disable ALL error logging from PHP, include this in the top of the PHP files:

error_reporting("E_ALL")

You can also selectively disable error messages by severity:

http://uk3.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

The php.ini file can also be changed rather than putting these inside the actual PHP files, but you mentioned cPanel and I'm not sure if you can edit that.

share|improve this answer
2  
error_reporting make no difference to error logging, that is a separate option. –  DisgruntledGoat Jun 9 '12 at 20:00
    
@ionFish: moreover error_reporting("E_ALL") would only amplificate the number of errors logged and not reduce them, i.e. E_NOTICE is off by default, but if you set error_reporting("E_ALL") you are going to turn on also E_NOTICE errors. –  Marco Demaio Jun 11 '12 at 13:12
add comment

You would need to disable error logging in PHP. If you cannot modify your php.ini file, you may be able to set the option in your htaccess like this:

php_value log_errors 0

Alternatively you can use the function ini_set in all your PHP files.

The error/info message is a strange one, though. I can't find any information on what it might be. Do all the files/folders listed in the message exist?

share|improve this answer
    
I am reluctant to disable error logging, I'd rather put up with it. I was hoping to find out the cause or turn off that particular one. The error.php file is the page that caused the error and the php directory is listed as 'PHPHANDLER' in PHPInfo, but I can't check if it exists because I don't have access –  HXCaine Jun 10 '12 at 14:14
1  
You may be able to set error reporting to a level that doesn't include that message, and only shows errors. As for finding the source of the message, if you don't have access to the server then you should contact your host about it. –  DisgruntledGoat Jun 10 '12 at 16:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.