Skip to content

Commit

Permalink
Don't restrict preloading with "open_basedir" directive.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Feb 19, 2019
1 parent b1b3927 commit 0510b41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/opcache/ZendAccelerator.c
Expand Up @@ -3839,8 +3839,11 @@ static int accel_preload(const char *config)
zend_file_handle file_handle;
int ret;
uint32_t orig_compiler_options;
char *orig_open_basedir;

ZCG(enabled) = 0;
orig_open_basedir = PG(open_basedir);
PG(open_basedir) = NULL;
preload_orig_compile_file = accelerator_orig_compile_file;
accelerator_orig_compile_file = preload_compile_file;

Expand Down Expand Up @@ -3892,6 +3895,7 @@ static int accel_preload(const char *config)
} zend_end_try();

CG(compiler_options) = orig_compiler_options;
PG(open_basedir) = orig_open_basedir;
accelerator_orig_compile_file = preload_orig_compile_file;
ZCG(enabled) = 1;

Expand Down

0 comments on commit 0510b41

Please sign in to comment.