php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49850 Cannot override Apache2 vhost ErrorLog with vhost error_log
Submitted: 2009-10-12 19:22 UTC Modified: 2009-10-19 11:16 UTC
From: rmichael-php at edgeofthenet dot org Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.2.9 OS: OpenSolaris
Private report: No CVE-ID: None
 [2009-10-12 19:22 UTC] rmichael-php at edgeofthenet dot org
Description:
------------
(This bug is against PHP 5.2.9, but I cannot choose it in the pull-down menu; and, there is nothing related in ChangeLogs since then.)


PHP error_log output goes to Apache's ErrorLog file, not the php_admin_value error_log I specify.

Both Apache's ErrorLog and PHP's error_log are being specified in a virtualhost configuration file:


Results in phpinfo() indicating the error_log is in fact the file set with "php_admin_value error_log", but the test string appears in the Apache ErrorLog file instead.

I believe this is dupe of 31419, but that bug was closed.
http://bugs.php.net/bug.php?id=31419


# httpd -V
Server version: Apache/2.2.11 (Unix)
Server built:   Jun 24 2009 11:50:30
Server's Module Magic Number: 20051115:21
Server loaded:  APR 1.3.3, APR-Util 1.3.7
Compiled using: APR 1.3.3, APR-Util 1.3.4

# php --version
PHP 5.2.9 (cli) (built: Jun  4 2009 21:25:09) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


Reproduce code:
---------------
<VirtualHost *>
    php_admin_flag display_errors On
    php_admin_flag display_startup_errors On
    php_admin_value error_reporting 6143
    php_admin_flag log_errors On
    php_admin_value error_log /path/to/my_php-error_log

    ErrorLog /path/to/my_apache-error_log
</VirtualHost>


<?php
  error_log("Test error log.");
  phpinfo();
?>

Expected result:
----------------
Error log output should go to /path/to/my_php-error_log as specified in the virtualhost configuration file.

(Just consulted bugs suggest relates issues; none apply.)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-12 20:06 UTC] srinatar@php.net
did you try to reproduce this issue with recently released php 5.2.11 ? i am not able to reproduce this issue with latest php snapshot (http://snaps.php.net) on both php 5.2. and php 5.3


 [2009-10-19 11:16 UTC] jani@php.net
That other bug is closed because it was fixed. You should really update..
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 19:01:30 2024 UTC