Bug #18447 Updated: Error-Log File is overwritten for every new Error
| From: | sniper@php.net | Date: | Sun, 21 Jul 2002 00:57:50 +0000 |
| Subject: | Bug #18447 Updated: Error-Log File is overwritten for every new Error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14709@lists.php.net to get a copy of this message | ||
ID: 18447
Updated by: sniper@php.net
Reported By: akorthaus@web.de
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 4.1.2
New Comment:
No other idea but is is the log file writable by anyone?
(And do try 4.2.1, I still can't reproduce this..)
Previous Comments:
------------------------------------------------------------------------
[2002-07-20 17:05:16] akorthaus@web.de
OK, you´re right, the Problem is more difficult.
It only doesn´t work with logging Errors, if I try to start a
PHP-Script form SHELL, this way:
I´ve got the following lines into my ~/.bashrc
PATH="$PATH":"$HOME"/bin
export PATH
In "/bin" I´ve got my important scripts I often use, so I can start a
script in "bin/file.php" from every directory only by writing
"file.php".
But - if I start a script this way, no errors are logged, if I´m in
"/temp/logs" I can use "file.php", than no errors are logged, but if I
write ../../bin/file.php logging works perfectly!
Do you have an idea why this happens?
------------------------------------------------------------------------
[2002-07-20 12:33:59] sniper@php.net
I can not reproduce this with PHP 4.2.1. (CGI)
Make that filename for the log to be absolute,
e.g.:
error_log=/tmp/php-log.txt
------------------------------------------------------------------------
[2002-07-20 04:52:00] akorthaus@web.de
Hi!
I´ve run php as CGI-Version with Apache.
Because I don´t want errors to be shown on the website, I changed the
following values of php.ini:
display_errors = Off
// so no Errors are displayd anymore
log_errors = On
// Errors should be logged
error_log = log.txt
// into this file
It works fine, but there is only the last error in this log-file, old
errors are overwritten.
I think error-logs should log ALL errors. If I try from SHELL:
php script.php 2>>log.txt
it works, but I can´t open all my PHP-Scripts from SHELL and I don´t
want to use 2>> every time ;-)
rgds
Andreas Korthaus
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18447&edit=1