felipe                                   Wed, 06 Jul 2011 01:54:54 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=312974

Log:
- Fixed bug #55076 (requires() fails in a subdirectory with the in-built 
webserver)

Bug: https://bugs.php.net/55076 (Re-Opened) requires() fails in a subdirectory 
with the in-built webserver
      
Changed paths:
    U   php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
    U   php/php-src/trunk/sapi/cli/php_cli_server.c

Modified: php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-07-06 
00:53:43 UTC (rev 312973)
+++ php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c      2011-07-06 
01:54:54 UTC (rev 312974)
@@ -2060,6 +2060,8 @@

        if (document_root) {
                struct stat sb;
+               char resolved_path[MAXPATHLEN];
+
                if (stat(document_root, &sb)) {
                        fprintf(stderr, "Directory %s does not exist.\n", 
document_root);
                        return 1;
@@ -2068,6 +2070,9 @@
                        fprintf(stderr, "%s is not a directory.\n", 
document_root);
                        return 1;
                }
+               if (VCWD_REALPATH(document_root, resolved_path)) {
+                       document_root = resolved_path;
+               }
        } else {
                char path[MAXPATHLEN];
                char *ret = NULL;

Modified: php/php-src/trunk/sapi/cli/php_cli_server.c
===================================================================
--- php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-06 00:53:43 UTC (rev 
312973)
+++ php/php-src/trunk/sapi/cli/php_cli_server.c 2011-07-06 01:54:54 UTC (rev 
312974)
@@ -2060,6 +2060,8 @@

        if (document_root) {
                struct stat sb;
+               char resolved_path[MAXPATHLEN];
+
                if (stat(document_root, &sb)) {
                        fprintf(stderr, "Directory %s does not exist.\n", 
document_root);
                        return 1;
@@ -2068,6 +2070,9 @@
                        fprintf(stderr, "%s is not a directory.\n", 
document_root);
                        return 1;
                }
+               if (VCWD_REALPATH(document_root, resolved_path)) {
+                       document_root = resolved_path;
+               }
        } else {
                char path[MAXPATHLEN];
                char *ret = NULL;

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

Reply via email to