Re: cvs: php-src /main php_ini.c
| From: | Andi Gutmans | Date: | Fri, 29 Jul 2005 00:26:13 +0000 |
| Subject: | Re: cvs: php-src /main php_ini.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-33114@lists.php.net to get a copy of this message | ||
Ok thanks.
At 03:18 AM 7/29/2005 +0300, Jani Taskinen wrote:
It's a fix. php.ini was looked in php/ when it should have been looked under /<path-to-php-binary>/--JaniOn Thu, 28 Jul 2005, Andi Gutmans wrote:Is this a bug fix? Or added functionality? At 03:12 PM 7/27/2005 +0000, Hartmut Holzgraefe wrote:-- Donate @ http://pecl.php.net/wishlist.php/sniper -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phphholzgra Wed Jul 27 11:12:19 2005 EDTModified files:/php-src/main php_ini.cLog: php.ini search logic needs to use the absolute path of the running binary when looking for php.ini in the directory the php binary is installed in http://cvs.php.net/diff.php/php-src/main/php_ini.c?r1=1.130&r2=1.131&ty=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.130 php-src/main/php_ini.c:1.131--- php-src/main/php_ini.c:1.130 Fri Jun 17 05:39:23 2005 +++ php-src/main/php_ini.c Wed Jul 27 11:12:18 2005@@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ini.c,v 1.130 2005/06/17 09:39:23 dmitry Exp $ */ +/* $Id: php_ini.c,v 1.131 2005/07/27 15:12:18 hholzgra Exp $ */ /* Check CWD for php.ini */ #define INI_CHECK_CWD @@ -350,7 +350,11 @@}#elseif (sapi_module.executable_location) { - binary_location = estrdup(sapi_module.executable_location); + binary_location = (char *)emalloc(PATH_MAX); + if (!realpath(sapi_module.executable_location, binary_location)) { + efree(binary_location); + binary_location = NULL; + } } else { binary_location = NULL; }@@ -359,7 +363,7 @@char *separator_location = strrchr(binary_location, DEFAULT_SLASH); if (separator_location) { - *(separator_location+1) = 0; + *(separator_location) = 0; } if (*php_ini_search_path) { strcat(php_ini_search_path, paths_separator);-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php