Re: include_path question
| From: | Andi Gutmans | Date: | Sun, 27 Aug 2000 19:20:03 +0000 |
| Subject: | Re: include_path question | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-30836@lists.php.net to get a copy of this message | ||
At 09:14 PM 8/27/00 +0200, Sascha Schumann wrote:
On Sun, 27 Aug 2000, Andi Gutmans wrote: At 09:48 PM 8/27/00 +0300, Andi Gutmans wrote:Yes I agree that centralizing this behavior is a good thing. It just kind of frustrated me that things are breaking when I thought the tree to be stable. Lucky this guy sent a good bug report because there were a few mentions of things working weird and no one gave any good bug reports up to now.notWhat 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 andThe change breaks SAPI modules which pass a relative path to PHP (i.e. foo/bar/file.php). PHP will now chdir to foo/bar and will try to open the file foo/bar/file.php in that directory which will fail, of course.in main.c.BTW, I can see how my patch is also wrong. Maybe the whole move you made shouldn't have been made. We need to think of a *right* way to fix this issue.Well, the bad part is that there is no documentation anywhere about how all this stuff interacts.By moving logic from the single SAPI module to a more central location we get at least consistent behaviour across all SAPI modules. This is good, because it makes PHP scripts "portable" across multiple web-servers.
What is wrong with your patch? It should work with every web
server which passes an absolute path in primary_file.
I thought it doesn't work with CGI but I checked and CGI seems to be a good boy and set path_translated to full path too :)
Andi
---
Andi Gutmans <andi@zend.com>
http://www.zend.com/