ID:               31419
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php at mfoxx dot myspamkiller dot com
-Status:           Open
+Status:           Closed
 Bug Type:         PHP options/info functions
 Operating System: Debian 4.0
 PHP Version:      5.2.0-8+etch10
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2008-08-07 19:54:33] kc6r5jsp74mzt03 at bodhi dot lawlita dot com

Hello,

same issue on Windows:

PHP Version 5.2.4 (ZendCore 2.5.0)
Apache 2.2.9

In httpd.conf I set the default ErrorLog value:
ErrorLog "D:/Logs/default_error.log"

I created a vhost with a customized ErrorLog value:
<VirtualHost *:80>
   ServerName   foobar
   ServerAdmin  [EMAIL PROTECTED]
   DocumentRoot "D:/Webs/www1/htdocs"
        
   ErrorLog "D:/Logs/www1_error.log"
   CustomLog "D:/Logs/access_www1_%Y-%m-%d.log" common
</VirtualHost>

------------------------------------------------------------------------

[2008-08-06 14:53:05] php at mfoxx dot myspamkiller dot com

I *still* have this same problem, 3+ years later, in that if I run PHP
(now 5.2.0 on Debian Etch, originally v4.x and then 5.0.4 on Debian
Woody) through Apache with VirtualHosts that set apache "ErrorLog"
settings in the VirtualHost, then PHP will not log it's errors to a
separate ini specified (either in php.ini or with ini_set()) php error
file, but will instead put the errors in the apache error log.

This same problem has occured whether I use a custom build of PHP or
whether I use the debian package builds (as I do now).

------------------------------------------------------------------------

[2008-08-06 13:58:37] alexey dot portnov at gmail dot com

Description:
------------
FreeBSD 6.2-RELEASE
apache 2.2.9, php-5.2.6, (from ports)

php.ini config: /usr/local/etc/php.ini
error_log = /home/sites/php_logs/php_errors.log


PHP will not even write the errors to the original error_log value set
 in the php.ini.  It will instead write them to apache's error log
for that particular <virtualhost>.


The error does occur, and it DOES get logged, just not to the right
file, it now gets logged to the APACHE error log file, not even the
original php.ini error_log setting, which I find very strange.

Reproduce code:
---------------
<?php

phpinfo();

echo nonexistent();

?>

Expected result:
----------------
When I force a PHP error, calling a "nonexistent()" function, I should
get the error logged into my /home/sites/php_logs/php_errors.log file as
specified in /usr/local/etc/php.ini

Actual result:
--------------
the error (call to undefined function) DOES get logged, but to the
wrong
file... it gets logged to the Apache error file for that particular
<virtualhost>.  It doesn't even get logged to the original php.ini
file's setting for error_log.

PHP writes errors in $error_log only when I run scripts from CLI:
php /path-to/script.php

------------------------------------------------------------------------

[2005-07-18 19:26:03] [EMAIL PROTECTED]

Using latest CVS snapshot (5.1-dev) this works just fine,
provided the path passed to error_log is such that the webserver can
write into it. And I don't get any PHP errors in the apache logs
either.

Check the permissions. And if that wasn't the cause, check what php.ini
file is used (shown in phpinfo() output) and do a 'diff -u' between that
and php.ini-dist from the latest CVS snapshot you're using.


------------------------------------------------------------------------

[2005-07-18 18:52:09] mfoxx at hotmail dot com

Also, here is the VirutalHost directive from httpd.conf:

<VirtualHost xxx.xxx.xxx.xxx>
        ServerAdmin [EMAIL PROTECTED]
        DocumentRoot /www/xxx
        ServerName www.xxx.com
        ErrorLog /www/logs/xxx_com-error.log
        CustomLog /www/logs/xxx_com-access.log common
</VirtualHost>

The apache error log I keep referring to, that is getting the PHP
errors logged to it, is the one specified above at "ErrorLog",
xxx_com-error.log.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/31419

-- 
Edit this bug report at http://bugs.php.net/?id=31419&edit=1

Reply via email to