From: Felipe Pena Date: Sun, 3 Jul 2011 14:45:41 +0000 (+0000) Subject: - Fixed bug #55118 (Imcomplete start message) X-Git-Tag: php-5.4.0alpha2~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7711da059ed014d15b2767acde8c1c08ef477693;p=php - Fixed bug #55118 (Imcomplete start message) --- diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index ab2dc6c32b..365f352244 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -2069,7 +2069,15 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */ return 1; } } else { - document_root = "."; + char path[MAXPATHLEN]; + char *ret = NULL; + +#if HAVE_GETCWD + ret = VCWD_GETCWD(path, MAXPATHLEN); +#elif HAVE_GETWD + ret = VCWD_GETWD(path); +#endif + document_root = ret ? path : "."; } if (argc > php_optind) {