Web Design Forum: Stop Error Log On Apache - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Stop Error Log On Apache Rate Topic: -----

#1 User is offline   GoodWill 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 10-January 12
  • Reputation: 0

Posted 10 January 2012 - 02:19 PM

Hi guys this is my first post, which i wish it wasnt.

Ive been a php developer for a while now but never have i had to do this, as being a developer my job is to fix and not hide bad coding.

When i say bad coding at the time it was good coding but as its php4 and alot of it has depreciated its not the old programmers fault.

Anyway my friend has asked me to make it so the website does not submit a error report as the website is storing a GB a month which is huge, when you look at it, its all things like split() function which is depreciated in php5.3, it still works but it sends an error to the log.

The reason why its taking a GB a month is he has about 5000 page views a day, which each page gives of 3 reports, so thats 15000 lines of code a day.

He states he has no money so cant get me to rewrite his site but can i turn of the reporting.

I asked if i could get into his php.ini and he states i cant as he is a shared hosting platform.

So my question is can i use for instance:

<?php
 error_log(Off);
?>


at the top off the page?

If not how do i go about this?

Thanks

Will
0

#2 User is online   Jay Gilford 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,105
  • Joined: 11-October 09
  • Reputation: 185
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 10 January 2012 - 02:22 PM

Try
error_reporting(E_NONE);


Do you have access to the php.ini file etc? Or are you on shared hosting?
Also, why not just set up a cron job to delete the log file every couple of hours or so?

This post has been edited by Jay Gilford: 10 January 2012 - 02:23 PM

0

#3 User is offline   skidz 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,047
  • Joined: 24-November 08
  • Reputation: 135
  • Gender:Male
  • Location:Derby
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 10 January 2012 - 02:29 PM

This sounds like my worse nightmare.

As Jay said, error_reporting(E_NONE); should "HIDE" the problem.


IMO if your friends getting 5000 page views a day, he should FIX the problem!
0

#4 User is offline   GoodWill 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 10-January 12
  • Reputation: 0

Posted 10 January 2012 - 02:40 PM

View PostJay Gilford, on 10 January 2012 - 02:22 PM, said:

Try
error_reporting(E_NONE);


Do you have access to the php.ini file etc? Or are you on shared hosting?
Also, why not just set up a cron job to delete the log file every couple of hours or so?


I have no access to the php.ini file, also he can only give me access to ftp public_html and database through phpmyadmin,

The ex web design company do not offer anything else.

You state error_reporting(E_NONE); should fix it

Will this stop apache sending it to logs as error reporting is already set to hide all information anyway.
0

#5 User is offline   GoodWill 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 10-January 12
  • Reputation: 0

Posted 10 January 2012 - 02:43 PM

View Postskidz, on 10 January 2012 - 02:29 PM, said:

This sounds like my worse nightmare.

As Jay said, error_reporting(E_NONE); should "HIDE" the problem.


IMO if your friends getting 5000 page views a day, he should FIX the problem!


As the website is a hobby website and he makes no money at all, it costs him £30 a month infact for server costs.

He has been quoted £800 and to be fair when i look at it, as its all oop and complex at times i would also quote him about the same.

He doesnt have that money to spend on a hobby so as it works he just wants to stop apache generating errors.

For instance alot of it is from broken links from old posts which google chuck at it and referring websites but most are from old functions which will not be around for much longer.
0

#6 User is online   Jay Gilford 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,105
  • Joined: 11-October 09
  • Reputation: 185
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 10 January 2012 - 03:17 PM

If he has to pay £30/month for a server, he should have access to create cron jobs to delete the file, or get the hosting company to set one up (it would be in their interest too). If he doesn't have that kind of access, then he would be better off moving to a better host on a vps for a similar cost, such as Web Fusion who give 100GB space and 2GB RAM for what he's paying now
0

#7 User is offline   GoodWill 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 10-January 12
  • Reputation: 0

Posted 10 January 2012 - 04:22 PM

View PostJay Gilford, on 10 January 2012 - 03:17 PM, said:

If he has to pay £30/month for a server, he should have access to create cron jobs to delete the file, or get the hosting company to set one up (it would be in their interest too). If he doesn't have that kind of access, then he would be better off moving to a better host on a vps for a similar cost, such as Web Fusion who give 100GB space and 2GB RAM for what he's paying now


I know i have said this to him.

His exact words is if its not broke then dont fix, i said it is broke that is why you need a fix.

He then states its not broken as it still works, its just that php are warning that they are discontinuing it... lol...

To be honest i think he is slowely getting bored of the site and eventually he will sell the site.

He wont get a lot for it but maybe a few hundred because its a pr5 and has alot of traffic.
0

#8 User is online   Jay Gilford 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,105
  • Joined: 11-October 09
  • Reputation: 185
  • Gender:Male
  • Experience:Web Guru
  • Area of Expertise:Web Developer

Posted 10 January 2012 - 04:39 PM

View PostGoodWill, on 10 January 2012 - 04:22 PM, said:

I know i have said this to him.

His exact words is if its not broke then dont fix, i said it is broke that is why you need a fix.

He then states its not broken as it still works, its just that php are warning that they are discontinuing it... lol...

To be honest i think he is slowely getting bored of the site and eventually he will sell the site.

He wont get a lot for it but maybe a few hundred because its a pr5 and has alot of traffic.

Fair enough, well they're the only solutions really. Like you say, it is broke and he does need it fixing. You could use unlink at the top of a page that is popular enough to be visited a few times a day, but not going to get hammered to delete the file each time it's viewed
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users