Re: include_path question
| From: | Andi Gutmans | Date: | Sun, 27 Aug 2000 20:01:17 +0000 |
| Subject: | Re: include_path question | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-30847@lists.php.net to get a copy of this message | ||
At 09:54 PM 8/27/00 +0200, Sascha Schumann wrote:
On Sun, 27 Aug 2000, Andi Gutmans wrote: At 09:39 PM 8/27/00 +0200, Sascha Schumann wrote:It is used by SAPI modules only. If you want to document that the main_script needs to be full-path then go ahead. I really don't think it's correct to add such code just in case one of the SAPI modules doesn't set it correctly. If we get to that bridge we can re-evaluate the situation and we might decide to go your way but right now there is no reason to do it except for adding bloat (and bugs). Recently I have been trying to clean things up a bit which includes a slow cleaning up of fopen_wrappers.c. I don't want to have such special case code hanging around PHP anymore so let's not add more to it. Anyway, I'm off to sleep. I also got rid of those 4KB that wouldn't be too good for ISAPI. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/I don't like your patch. It shouldn't be there because it is broken. SAPI modules should make sure that path_translated is full path. It is supposed to be this way and I doubt the modules do anything differently. If we find such a SAPI module the full path needs to be calculated there and not in main.c.goodI thought it doesn't work with CGI but I checked and CGI seems to be aWhat is wrong with your patch? It should work with every web server which passes an absolute path in primary_file.boy and set path_translated to full path too :)The last change should take care of all SAPI modules which pass a relative path to php_execute_script().That is based on the sole assumption that php_execute_script() is a well-defined interface. In fact, it is not. It is a convenience function, loosely grouping functionality which is commonly used by SAPI modules. The recently added check is such a convenient feature to avoid duplicating the code in multiple places.