...

View Full Version : How to stop website writing error logs



devinmaking
01-10-2012, 12:00 AM
Hi

I know this is not practical and should not be done. My friends website is written in php4 and alot of his functions are depreciated in php5.3.

His website still works on his server 100% but its chucking alot of error reports to the server.

He doesnt want me to rewrite the site which is pretty big as he has no money and personally i have no time at the moment.

He has stated that he just wants to make the site to stop sending errors to the errors log on the server, it can run up alot in a year and he wants to stop it rather than spending time doing it every month.

Is there a function like error_log(NULL); which i can just put at the top of every page to prevent this from happening.

I have looked on php.net but to nothing there.

Also if i cant do this, if i make a php.ini file and upload it to sever and just add the lines:

log_errors = Off

Will that work?

Spookster
01-10-2012, 12:39 AM
I'd check what the current php error logging settings are for his account. You can see that by running a php file with phpinfo() in it. And then as you mentioned you can override the error logging directive in the master PHP ini file with the local copy of the php.ini file.

devinmaking
01-10-2012, 10:10 AM
I'd check what the current php error logging settings are for his account. You can see that by running a php file with phpinfo() in it. And then as you mentioned you can override the error logging directive in the master PHP ini file with the local copy of the php.ini file.

As the website is hosted on a shared hosting account the mast php.ini is not available for access. So it would need to be done within a setup php.ini uploaded into the public_html section.

Can this be done?

BluePanther
01-10-2012, 10:15 AM
I'd check what the current php error logging settings are for his account. You can see that by running a php file with phpinfo() in it. And then as you mentioned you can override the error logging directive in the master PHP ini file with the local copy of the php.ini file.

:thumbsup: I would contact your web host for advice though.

devinmaking
01-10-2012, 10:51 AM
:thumbsup: I would contact your web host for advice though.

His host is within america and would cost a fortune to ring, as i am not getting paid and only helping out i would not want to ring lol and what ive been told the email support is not responsive lol..

You stated check the error log in the phpinfo function which i have,

The function shows:

error_log => local value= "no value" & master calue = "no value"
log_errors = on

would i setup a php.ini with the error_log = Off within it?

What information would that say on how its setup?

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum