Re: include_path question
| From: | Andi Gutmans | Date: | Sun, 27 Aug 2000 19:15:36 +0000 |
| Subject: | Re: include_path question | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-30834@lists.php.net to get a copy of this message | ||
At 09:04 PM 8/27/00 +0200, Sascha Schumann wrote:
Well, I was just pointing out that there is an inconsisteny
which had not been mentioned in the debate (PHP 3 always uses
"." independent of the include_path setting).
It wasn't a debate. I just asked :) And I was aware that fopen_wrappers originates in PHP 2 even.
Neither have I but you can cvs update and see for yourself :)I readded php_realpath.c? I didn't. The commit msg is broken.What problem does it fix exactly? And why did you readd php_realpath.c?Strange. I've never seen that before.
It fixed the problem that when you try and open the main script which
should be a full path name (PATH_TRANSLATED) it was opening the filename
and not the whole path which meant that php_fopen_wrappers() needed "." to
be in the include_path if include_path was being used. The filename should
stay intact and you should just CHDIR to the right place.
What is the logic behind php_fopen_wrapper() caring about the
the filename currently handled by Zend?
Nothing to do with Zend. What happened was that if you had include_path set to "/to/foo" and your main script (PATH_TRANSLATED) was /to/path/translated.php
then what you did was chdir(/to/path) and the via fopen_wrappers() Zend would open "translated.php", which according to the three hundred year old behavior of php_fopen_wrappers() meant that translated.php wasn't found even though it was in the current working directory.
What SAPI module passes relative path? path_translated should always be
full path and if it is not then it's a problem in the SAPI modules and not
in main.c.
At least thttpd does, but there are numerous I don't know
about (like pi3web, Zeus, Roxen).
Well I doubt these web servers don't give us a real path_translated and if they do then their SAPI modules need to make sure path_translated is setup correctly.
We might end up finding what I did is a problem too but the patch you made was definitely wrong.
Andi
---
Andi Gutmans <andi@zend.com>
http://www.zend.com/