@@ -1907,11 +1907,15 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1907
1907
int key_length ;
1908
1908
int from_shared_memory ; /* if the script we've got is stored in SHM */
1909
1909
1910
- if (!file_handle -> filename || !ZCG (enabled ) || ! accel_startup_ok ) {
1910
+ if (!file_handle -> filename || !ZCG (accelerator_enabled ) ) {
1911
1911
/* The Accelerator is disabled, act as if without the Accelerator */
1912
+ ZCG (cache_opline ) = NULL ;
1913
+ ZCG (cache_persistent_script ) = NULL ;
1912
1914
return accelerator_orig_compile_file (file_handle , type );
1913
1915
#ifdef HAVE_OPCACHE_FILE_CACHE
1914
1916
} else if (file_cache_only ) {
1917
+ ZCG (cache_opline ) = NULL ;
1918
+ ZCG (cache_persistent_script ) = NULL ;
1915
1919
return file_cache_compile_file (file_handle , type );
1916
1920
#endif
1917
1921
} else if (!ZCG (accelerator_enabled ) ||
@@ -1921,6 +1925,8 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1921
1925
return file_cache_compile_file (file_handle , type );
1922
1926
}
1923
1927
#endif
1928
+ ZCG (cache_opline ) = NULL ;
1929
+ ZCG (cache_persistent_script ) = NULL ;
1924
1930
return accelerator_orig_compile_file (file_handle , type );
1925
1931
}
1926
1932
@@ -1947,10 +1953,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1947
1953
/* try to find cached script by key */
1948
1954
key = accel_make_persistent_key (file_handle -> filename , strlen (file_handle -> filename ), & key_length );
1949
1955
if (!key ) {
1956
+ ZCG (cache_opline ) = NULL ;
1957
+ ZCG (cache_persistent_script ) = NULL ;
1950
1958
return accelerator_orig_compile_file (file_handle , type );
1951
1959
}
1952
1960
persistent_script = zend_accel_hash_str_find (& ZCSG (hash ), key , key_length );
1953
1961
} else if (UNEXPECTED (is_stream_path (file_handle -> filename ) && !is_cacheable_stream_path (file_handle -> filename ))) {
1962
+ ZCG (cache_opline ) = NULL ;
1963
+ ZCG (cache_persistent_script ) = NULL ;
1954
1964
return accelerator_orig_compile_file (file_handle , type );
1955
1965
}
1956
1966
0 commit comments