Quoting Scott MacVicar <sc...@macvicar.net>:
1. Is it safe to lookup the DOCUMENT_ROOT in fopen_wrappers. If not is there an alternative?

Not at the point the function is being executed on a fresh child start
PHP hasn't always been fully started by the time it's doing the config
merging. None of the SAPI variables have been imported.

You might be able to use sapi_getenv("DOCUMENT_ROOT", sizeof("DOCUMENT_ROOT"))

This method dosen't appear to work.

Another solution is to skip doing you check before the SAPI is loaded :-)

If we do this then we cannot determine if the error_log is in the DOCUMENT_ROOT.

2. Why was this working in PHP 5.2.6 but now broken in 5.2.1x?

Are you sure you were using 5.2.6?  We never checked the error_log
value until 5.2.4, it's the first version to have it.

Yes I am positive it was PHP 5.2.6 - It worked with 5.2.4 and 5.2.5 as well. It would be intresting to understand why it worked in these versions.



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to