fake.free_filename = 0;
fake.opened_path = NULL;
fake.filename = filename;
+ fake.opened_path = file->opened_path;
*(dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint) * data.len)) = data;
zend_hash_add(&PHPDBG_G(file_sources), filename, strlen(filename), &dataptr, sizeof(phpdbg_file_source *), NULL);
ret = PHPDBG_G(compile_file)(&fake, type TSRMLS_CC);
+ fake.opened_path = NULL;
zend_file_handle_dtor(&fake TSRMLS_CC);
return ret;
phpdbg_error("The function %s could not be found", func_name);
}
} phpdbg_catch_access {
- phpdbg_error("Couldn't fetch function %.*s, invalid data source", func_name_len, func_name);
+ phpdbg_error("Couldn't fetch function %.*s, invalid data source", (int) func_name_len, func_name);
} phpdbg_end_try_access();
efree(lcname);
PHPDBG_G(exec) = res;
PHPDBG_G(exec_len) = res_len;
-
+
+ VCWD_CHDIR_FILE(res);
+
*SG(request_info).argv = PHPDBG_G(exec);
php_hash_environment(TSRMLS_C);