@@ -1880,16 +1880,22 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1880
1880
int key_length ;
1881
1881
int from_shared_memory ; /* if the script we've got is stored in SHM */
1882
1882
1883
- if (!file_handle -> filename || !ZCG (enabled ) || ! accel_startup_ok ) {
1883
+ if (!file_handle -> filename || !ZCG (accelerator_enabled ) ) {
1884
1884
/* The Accelerator is disabled, act as if without the Accelerator */
1885
+ ZCG (cache_opline ) = NULL ;
1886
+ ZCG (cache_persistent_script ) = NULL ;
1885
1887
return accelerator_orig_compile_file (file_handle , type );
1886
1888
} else if (file_cache_only ) {
1889
+ ZCG (cache_opline ) = NULL ;
1890
+ ZCG (cache_persistent_script ) = NULL ;
1887
1891
return file_cache_compile_file (file_handle , type );
1888
1892
} else if (!ZCG (accelerator_enabled ) ||
1889
1893
(ZCSG (restart_in_progress ) && accel_restart_is_active ())) {
1890
1894
if (ZCG (accel_directives ).file_cache ) {
1891
1895
return file_cache_compile_file (file_handle , type );
1892
1896
}
1897
+ ZCG (cache_opline ) = NULL ;
1898
+ ZCG (cache_persistent_script ) = NULL ;
1893
1899
return accelerator_orig_compile_file (file_handle , type );
1894
1900
}
1895
1901
@@ -1916,10 +1922,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1916
1922
/* try to find cached script by key */
1917
1923
key = accel_make_persistent_key (file_handle -> filename , strlen (file_handle -> filename ), & key_length );
1918
1924
if (!key ) {
1925
+ ZCG (cache_opline ) = NULL ;
1926
+ ZCG (cache_persistent_script ) = NULL ;
1919
1927
return accelerator_orig_compile_file (file_handle , type );
1920
1928
}
1921
1929
persistent_script = zend_accel_hash_str_find (& ZCSG (hash ), key , key_length );
1922
1930
} else if (UNEXPECTED (is_stream_path (file_handle -> filename ) && !is_cacheable_stream_path (file_handle -> filename ))) {
1931
+ ZCG (cache_opline ) = NULL ;
1932
+ ZCG (cache_persistent_script ) = NULL ;
1923
1933
return accelerator_orig_compile_file (file_handle , type );
1924
1934
}
1925
1935
@@ -3986,6 +3996,7 @@ static int accel_preload(const char *config)
3986
3996
char * orig_open_basedir ;
3987
3997
3988
3998
ZCG (enabled ) = 0 ;
3999
+ ZCG (accelerator_enabled ) = 0 ;
3989
4000
orig_open_basedir = PG (open_basedir );
3990
4001
PG (open_basedir ) = NULL ;
3991
4002
preload_orig_compile_file = accelerator_orig_compile_file ;
0 commit comments