mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Fixed bug #55076 (requires() fails in a subdirectory with the in-built webserver)
This commit is contained in:
parent
8953916314
commit
93776977d8
1 changed files with 5 additions and 0 deletions
|
@ -2060,6 +2060,8 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */
|
|||
|
||||
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 @@ int do_cli_server(int argc, char **argv TSRMLS_DC) /* {{{ */
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue