PHP 4.0 Bug #8174: Logfile entries written to php.ini, arbitrary files
| From: | rich at alcor dot concordia dot ca | Date: | Fri, 08 Dec 2000 17:05:54 +0000 |
| Subject: | PHP 4.0 Bug #8174: Logfile entries written to php.ini, arbitrary files | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40580@lists.php.net to get a copy of this message | ||
From: rich@alcor.concordia.ca
Operating system: Digital Unix 4.0E
PHP version: 4.0.1pl2
PHP Bug Type: PHP options/info functions
Bug description: Logfile entries written to php.ini, arbitrary files
Noticed that strange files were being created in / (well,
in / of our chroot jail) whenever Apache restarted with
apachectl or SIGUSR1. Files often had unprintable characters in their four-letter filenames, and
contained
[07-Dec-2000 11:54:34] PHP Warning: Unable to load dynamic library './imap.so' - dlopen:
cannot load ./imap.so in Unknown on line 0
[07-Dec-2000 11:54:34] PHP Warning: Unable to load dynamic library './pgsql.so' - dlopen:
cannot load ./pgsql.so in Unknown on line 0
(with appropriate date stamp, of course). BUT THEN: Last time this happened, we started looking
around a little more, and found that our php.ini had been modified at a time in which no-one should
have been modifying it; there *was* an Apache restart at that time, and PHP logged the above errors
*into php.ini*!
This screams dangling-pointer to me, but I wouldn't know where to start to actually *fix* it,
alas.
PHP configured thusly:
./configure \
--without-gd \
--without-mysql \
--prefix=/pubmail/apache \
--with-config-file-path=/pubmail/apache/conf \
--with-apache=/local/pkg/apache.webmail/apache-1.3.6 \
--with-imap=/local/pkg/imap/imap-4.7c \
--with-pgsql=/pubmail/local/pkg/postgresql/root-postgresql-7.0.2
Select parts of php.ini:
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
log_errors = On
track_errors = Off
;error_prepend_string = "<font color=ff0000>"
;error_append_string = "</font>"
error_log = /apache/logs/php_errors.log
warn_plus_overloading = Off ; warn if the + operator is used with strings
Other than the arbitrary file, PHP also logs its errors to the Apache error_log. It *doesn't*
log to /apache/logs/php_errors.log, though.
--
Edit Bug report at: http://bugs.php.net/?id=8174&edit=1