Re: extra realpath() found
| From: | Sander Roobol | Date: | Mon, 24 Feb 2003 14:03:13 +0000 |
| Subject: | Re: extra realpath() found | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-94529@lists.php.net to get a copy of this message | ||
On Sun, Feb 23, 2003 at 01:25:34PM -0800, Rasmus Lerdorf wrote:
> Hey Sander, you fixed a problem back in July where you introduced a second
> realpath() call into the main execute_script() function.
> [...]
> php_fopen_primary_script() calls expand_filepath() which does the realpath
> before we get to execute_script. Why not add the path to the
> included_files list at that point instead?
>
> Let me know if you feel like playing with it, otherwise I will.
I looked into it briefly, as I don't have much time currently, but I
discovered it's not that easy. php_fopen_primary_script() is only used
by the CGI and Servlet SAPI, while all SAPIs call php_execute_script().
We need to find a different place to update the included_files list, or
make sure the SAPIs don't call realpath() themselves.
I think it's better if someone with some more experience with PHP's
internals looks into this, because it will take me too much time right
now.
Sander