@@ -1761,11 +1761,15 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1761
1761
int key_length ;
1762
1762
int from_shared_memory ; /* if the script we've got is stored in SHM */
1763
1763
1764
- if (!file_handle -> filename || !ZCG (enabled ) || ! accel_startup_ok ) {
1764
+ if (!file_handle -> filename || !ZCG (accelerator_enabled ) ) {
1765
1765
/* The Accelerator is disabled, act as if without the Accelerator */
1766
+ ZCG (cache_opline ) = NULL ;
1767
+ ZCG (cache_persistent_script ) = NULL ;
1766
1768
return accelerator_orig_compile_file (file_handle , type );
1767
1769
#ifdef HAVE_OPCACHE_FILE_CACHE
1768
1770
} else if (file_cache_only ) {
1771
+ ZCG (cache_opline ) = NULL ;
1772
+ ZCG (cache_persistent_script ) = NULL ;
1769
1773
return file_cache_compile_file (file_handle , type );
1770
1774
#endif
1771
1775
} else if (!ZCG (accelerator_enabled ) ||
@@ -1775,6 +1779,8 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1775
1779
return file_cache_compile_file (file_handle , type );
1776
1780
}
1777
1781
#endif
1782
+ ZCG (cache_opline ) = NULL ;
1783
+ ZCG (cache_persistent_script ) = NULL ;
1778
1784
return accelerator_orig_compile_file (file_handle , type );
1779
1785
}
1780
1786
@@ -1801,10 +1807,14 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
1801
1807
/* try to find cached script by key */
1802
1808
key = accel_make_persistent_key (file_handle -> filename , strlen (file_handle -> filename ), & key_length );
1803
1809
if (!key ) {
1810
+ ZCG (cache_opline ) = NULL ;
1811
+ ZCG (cache_persistent_script ) = NULL ;
1804
1812
return accelerator_orig_compile_file (file_handle , type );
1805
1813
}
1806
1814
persistent_script = zend_accel_hash_str_find (& ZCSG (hash ), key , key_length );
1807
1815
} else if (UNEXPECTED (is_stream_path (file_handle -> filename ) && !is_cacheable_stream_path (file_handle -> filename ))) {
1816
+ ZCG (cache_opline ) = NULL ;
1817
+ ZCG (cache_persistent_script ) = NULL ;
1808
1818
return accelerator_orig_compile_file (file_handle , type );
1809
1819
}
1810
1820
0 commit comments