diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-06-25 00:35:52 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-06-25 00:36:01 +0200 |
commit | f42cdf83b00182dc26ad11d3917a6275288b5b4b (patch) | |
tree | 4624f22319c9758190cdc708ecb0996f08d1a3cf /sapi/phpdbg/phpdbg_prompt.c | |
parent | 190478e9da8e199b6d8812c86554ed8f1b3d7900 (diff) | |
download | php-git-f42cdf83b00182dc26ad11d3917a6275288b5b4b.tar.gz |
Fix paths issue when fetching .phpdbginit under Windows
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 146532f81e..3b1ec1f19a 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -346,9 +346,12 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) / { if (!init_file && use_default) { char *scan_dir = getenv("PHP_INI_SCAN_DIR"); + char *sys_ini; int i; - phpdbg_try_file_init(PHPDBG_STRL(PHP_CONFIG_FILE_PATH "/" PHPDBG_INIT_FILENAME), 0); + asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH); + phpdbg_try_file_init(sys_ini, strlen(sys_ini), 0); + free(sys_ini); if (!scan_dir) { scan_dir = PHP_CONFIG_FILE_SCAN_DIR; |