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>/

    --Jani

On 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:
hholzgra                Wed Jul 27 11:12:19 2005 EDT
  Modified files:
    /php-src/main       php_ini.c
  Log:
  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 @@
                }
 #else
                if (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


--
Donate @ http://pecl.php.net/wishlist.php/sniper

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to