Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

mha

/var/log/httpd/error_log growing rapidly

7 posts in this topic

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

Share this post


Link to post
Share on other sites

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

mha likes this

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites