From:             david dot morel at amakuru dot net
Operating system: Linux (homebrew)
PHP version:      4.3.4
PHP Bug Type:     Output Control
Bug description:  logfile ownership as root on extension loading failure

Description:
------------
When using a logfile to record errors, if the logfile doesn't yet exist,
and if an extension cannot be loaded properly, the startup message will be
written in this newly created file as the owner of the top webserver
process, root.
So subsequent tries by child processes to write in this file fail and no
error is recorded

I guess the same would apply to any load-time source of error.

Nice thing would be that the logging facility checks the euid and see if
it is different from the one the server is supposed to run his childs with
(IMHO).



Reproduce code:
---------------
1) set log errors to true in php.ini
2) in extensions, add a bogus filename
3) delete previous error log
4) launch webserver server
5) extension loading failure appears in log, but child processes can't
append anything.


-- 
Edit bug report at http://bugs.php.net/?id=26989&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26989&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26989&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26989&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26989&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26989&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26989&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26989&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26989&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26989&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26989&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26989&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26989&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26989&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26989&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26989&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26989&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26989&r=float

Reply via email to