Bug 77199 - php logging oddities
Summary: php logging oddities
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-11-02 22:44 UTC by Carl T. Miller
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-02-03 12:06:27 UTC

Attachments (Terms of Use)

Description Carl T. Miller 2002-11-02 22:44:43 UTC
Description of Problem:
A php script that worked with RH73 wouldn't work with RH80.  I turned on logging
and set the log file to /var/log/httpd/php_errors in the /etc/php.ini file. 
After this the script worked.  (Why would this make any difference?)

When I put an error in the script to test the logging feature, nothing was
logged.  Just to be sure, I created the log file and changed ownership to
apache:apache.  Tried again, and again no log entry was made, although now
errors appeared in the html output.

Am I missing something, or should logging errors be as simple as setting these
two lines in /etc/php.ini?

log_errors = on
error_log = /var/log/httpd/php_errors

Comment 1 Joe Orton 2002-11-04 12:00:13 UTC
Since the directory /var/log/httpd is only read&writable by root, PHP will not
be able to open a log file at /var/log/httpd/php_log.

There are a few things which changed in the PHP configuration in 8.0;
register_globals is now off by default, as is short_open_tag, maybe one of these
affects your script too.

Comment 2 Carl T. Miller 2002-11-05 23:30:16 UTC
Actually I had already turned on short_open_tag and the register_globals didn't
make any difference.  As I said, the script ran perfectly after I changed the
logging option.  Maybe I should set the logging option back to the original
setting and see what happens.

Thanks for pointing out permissions on /var/log/httpd.  I'll see if changing the
permissions makes any difference.

Comment 3 Joe Orton 2002-11-29 10:22:10 UTC
Did you work out what the problem was here?

Comment 4 Joe Orton 2005-02-03 12:06:27 UTC
Thanks for the report.  This is a mass bug update; since this release
of Red Hat Linux is no longer supported, please either:

a) try and reproduce the bug with a supported version of Red Hat
Enterprise Linux or Fedora Core, and re-open this bug as appropriate
after changing the Product field, or,

b) if relevant, try and reproduce this bug using the current version
of the upstream package, and report the bug upstream.

c) report the bug to the Fedora Legacy project who may wish to
continue maintenance of this package.

Note You need to log in before you can comment on or make changes to this bug.