Mobile app version of vmapp.org
Login or Join
Merenda212

: Why does PHP create these log entries on every page access? 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'

@Merenda212

Posted in: #Error #Logging #Php

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Merenda212

2 Comments

Sorted by latest first Latest Oldest Best

 

@Yeniel560

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?

10% popularity Vote Up Vote Down


 

@Ravi8258870

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:
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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme