Re: PHP Support Not Taking Issues Seriously
| From: | Noel Forbes | Date: | Wed, 01 Feb 2006 22:26:49 +0000 |
| Subject: | Re: PHP Support Not Taking Issues Seriously | ||
| References: | 1 2 3 4 5 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-26668@lists.php.net to get a copy of this message | ||
Brian Moon wrote:
>> You can't do that. Relative include paths are already specified in the
>> INI variable. Using $curdir as a base gives you things like
>> "/home/brianm/public_html//usr/local/lib/php/../inc/incfile.php".
>>
>> Clearly incorrect.
>>
>> I don't think it matters overall, but I wanted to point that out.
>
>
> Yeah, I know. It was more for convenience.
>
>> /* Relative path open */
>> if (*filename == '.' && (IS_SLASH(filename[1]) || filename[1] ==
>> '.')) {
>> It looks to me like the include_path isn't even being checked here.
>> Should the documentation explain that better?
>
>
> do you mean that items in the include_path are skipped or that includes
> that start with . are not looked for using the include_path? I have
> tested some things here that show that including something relative to
> an absolute path in the include path does work.
>
This check is looking for includes that start with either "./" or "../.
If the include starts with either of those two names, it just does a
direct fopen instead of trying to use include_path with the include
filename.
> Example here. My include_path:
>
> .:/usr/local/lib/php:/www/codelib/include
>
> structure:
> /www
> /www/codelib/include
> /www/datalib/include
> /www/virthost/docroot
>
> I can include "../../datalib/include/pub_data.php" from docroot.
Of course. Because
/www/virthost/docroot/../../datalib/include/pub_data.php exists.
> FWIW, I can see clearly why what John is doing is wrong and I would
> never do it. I just want the manual to be clear because i don't think
> it is. If I understood why PHP would not let him do what he is doing, I
> would change the manual myself.
Okay. I'll look into it.
--
Noel Forbes
PHP Documentation Team