Changeset 138
- Timestamp:
- 11/21/05 00:01:28 (3 years ago)
- Files:
-
- eaccelerator/trunk/ChangeLog (modified) (1 diff)
- eaccelerator/trunk/eaccelerator.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ChangeLog
r136 r138 1 2005-11-20 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 3 * check_cache_dir is only done when shm_only = 0 4 * Only eA is disabled when init of shared mem or cache check fails 5 1 6 2005-11-20 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 2 7 eaccelerator/trunk/eaccelerator.c
r134 r138 252 252 static int check_cache_dir(char *cache_dir) { 253 253 struct stat buf; 254 int uid = 0;255 int gid = 0;256 254 // int uid = 0; 255 // int gid = 0; 256 257 257 if (stat(cache_dir, &buf) == -1) { 258 258 ea_debug_error("Cache dir does not exist (could not stat %s)\n", cache_dir); 259 return 0;259 return FAILURE; 260 260 } 261 261 if (!(buf.st_mode & S_IFDIR)) { 262 262 ea_debug_error("%s is not a directory!\n", cache_dir); 263 return 0;263 return FAILURE; 264 264 } 265 265 #if 0 … … 273 273 } 274 274 #endif 275 return 1;275 return SUCCESS; 276 276 } 277 277 … … 327 327 eaccelerator_mm_instance->last_prune = time(0); 328 328 EACCELERATOR_PROTECT(); 329 330 if (!check_cache_dir(EAG(cache_dir))) {331 return FAILURE;332 }333 334 329 return SUCCESS; 335 330 } … … 2024 2019 if (init_mm(TSRMLS_C) == FAILURE) { 2025 2020 zend_error(E_CORE_WARNING,"[%s] Can not create shared memory area", EACCELERATOR_EXTENSION_NAME); 2026 return FAILURE; 2021 /* disable eA */ 2022 eaccelerator_mm_instance->enabled = 0; 2023 } 2024 2025 if (!eaccelerator_scripts_shm_only && check_cache_dir(EAG(cache_dir)) == FAILURE) { 2026 zend_error(E_CORE_WARNING,"[%s] Can not init the cache directory", EACCELERATOR_EXTENSION_NAME); 2027 /* disable eA */ 2028 eaccelerator_mm_instance->enabled = 0; 2027 2029 } 2028 2030