Jump to content



Photo
- - - - -

/var/log/httpd/error_log growing rapidly


This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1   mha

mha
  • Members
  • 4 posts

Posted 28 July 2012 - 16:03

Hi,
I installed my web shop as described in the documentation and it seems to work so far, but while httpd is running through the php files it creates tons of warnings and errors all the time, such as:

[Thu Jul 26 19:46:03 2012] [error] [client ...] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/german.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/catalog/admin/includes/application_top.php on line 167, referer: http://.../catalog/admin/mail.php
[Sat Jul 28 17:16:34 2012] [error] [client ...] PHP Warning: error_log(/var/log/www/tep/page_parse_time.log) [<a href='function.error-log'>function.error-log</a>]: failed to open stream: No such file or directory in /var/www/html/catalog/includes/functions/database.php on line 48, referer: http://.../catalog/index.php
[Sat Jul 28 17:16:34 2012] [error] [client ...] PHP Warning: error_log(/var/log/www/tep/page_parse_time.log) [<a href='function.error-log'>function.error-log</a>]: failed to open stream: No such file or directory in /var/www/html/catalog/includes/functions/database.php on line 41, referer: http://.../catalog/index.php
[Sat Jul 28 17:16:34 2012] [error] [client ...] PHP Warning: error_log(/var/log/www/tep/page_parse_time.log) [<a href='function.error-log'>function.error-log</a>]: failed to open stream: No such file or directory in /var/www/html/catalog/includes/application_bottom.php on line 20, referer: http://.../catalog/index.php
[Sat Jul 28 14:04:56 2012] [error] [client ...] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'DIR_WS_FUNCTIONScompatibility.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/catalog/includes/application_top.php on line 41
[Sat Jul 28 14:04:56 2012] [error] [client ...] PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'includes/configure.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/catalog/includes/application_top.php on line 28

Should I worry about these? How do I fix the underlying problem(s)?
cheers
mha

#2   MrPhil

MrPhil
  • Members
  • 5,288 posts

Posted 28 July 2012 - 17:30

Yes, you should be worrying about them. You shouldn't be getting any error messages during routine operations.

First of all, what version of osCommerce are you running? Is it a commercial template? You should be on osC 2.3.1, or even 2.3.2, if this is a new installation. The log file /var/log/www/tep/page_parse_time.log is hardcoded into the database (table configuration, title Log Destination) and might have to be changed if you do not have permissions to create and write to this file. Actually, since most sites on shared servers aren't going to be able to create this file, I'm not sure why this error isn't commonplace.

A missing includes/languages/german.php means that someone is trying to run using the German language, but it isn't installed. That, or there's something odd that PHP can't find that path while in includes/application_top.php. I've seen this error reported many times before, and suspect there's something changed in PHP 5's behavior, but no one has ever been able to tell me for sure. You should search this forum for the error messages you're getting, and read the discussions.

You have an attempt to use file DIR_WS_FUNCTIONScompatibility.php, which means that the "define" for DIR_WS_FUNCTIONS in your configure.php files is not correct or was not read. The next error suggests that configure.php file wasn't even opened and read. The fix for /includes/languages/german.php will probably also fix this one, unless somehow you erased your configure.php files or made them unreadable (permissions should be 644, and then 444 once you have them tuned the right way).

#3   mha

mha
  • Members
  • 4 posts

Posted 29 July 2012 - 09:14

Thanks for replying.
I'm on osC 2.3.1 and it's a new install. It had the default shop with DVDs etc.
german.php does exist:
-rw-r--r-- 1 root root 17K Jul 6 18:20 /var/www/html/catalog/includes/languages/german.php
so does:
-rw-r--r-- 1 root root 1.3K Jul 6 18:05 /var/www/html/catalog/includes/configure.php
httpd runs as user/group apache.

The log issue is solved. The log file can be defined in the osc admin tool and the logging turned off.

Edited by mha, 29 July 2012 - 09:28.


#4   14steve14

14steve14
  • Members
  • 3,529 posts

Posted 29 July 2012 - 11:05

Are you saying you have cured all the errors, or just turned off error reporting. The errors are there for a reason, and should not be there at all.

To see what errors are on your site open includes/application_top.php and change

error_reporting(E_ALL & ~E_NOTICE);

to

error_reporting(E_ALL & ~E_STRICT);

If the site is live, make sure you change it back or all your customers will see the errors on every page if there are any.
REMEMBER BACKUP, BACKUP AND BACKUP

Don't take life too seriously. no one gets out alive anyway

#5   mha

mha
  • Members
  • 4 posts

Posted 29 July 2012 - 14:47

The log fix has caused the other errors to go away so far, it seems. Fingers crossed...

#6   MrPhil

MrPhil
  • Members
  • 5,288 posts

Posted 29 July 2012 - 16:20

Did you merely turn off logging (so you don't see errors recorded any more), or did fixing where the log is written (not turning it off) somehow fix the inability to read /includes/configure.php and other files? I wouldn't expect that correcting where it tries to write the log would fix the other things, but stranger things have happened (perhaps trying to write to /var/log is not allowed, and sent PHP or the server into a tizzy?).

#7   mha

mha
  • Members
  • 4 posts

Posted 30 July 2012 - 13:48

I made the log file by hand and changed ownership to apache. That worked. Then I turned the page parsing off since I don't need it for now. The other errors have gone away since.