We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94bf353 commit eee0bdaCopy full SHA for eee0bda
sapi/servlet/servlet.c
@@ -300,6 +300,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
300
{
301
302
zend_file_handle file_handle;
303
+ char cwd[MAXPATHLEN+1];
304
jlong addr = 0;
305
SLS_FETCH();
306
PLS_FETCH();
@@ -339,7 +340,9 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
339
340
* Parse the file
341
*/
342
SETSTRING( SG(request_info).path_translated, pathTranslated );
343
+ getcwd(cwd,MAXPATHLEN);
344
file_handle.handle.fp = php3_fopen_for_parser();
345
+ chdir(cwd);
346
file_handle.filename = SG(request_info).path_translated;
347
file_handle.free_filename = 0;
348
file_handle.type = ZEND_HANDLE_FP;
0 commit comments