What should I do if phpcms cannot read the cache?
The website is running normally on the server. I can enter the website background on my computer and update the cache page. Blank, access to the home page is still blank. Debugging found that it was executed in include/common.inc.php until the following was not executed.
The code is as follows:
$CACHE = cache_read('common.php'); if(!$CACHE) { require_once 'cache.func.php'; cache_all(); $CACHE = cache_read('common.php'); } extract($CACHE); unset($CACHE);
Recommendation:phpcms v9 download
Comment it out and you can enter. Even updating the cache doesn't work. The home page can be seen, but the modified files cannot be seen.
Solution:
After debugging the cache_read function step by step, it was finally solved, because php.ini The value of memory_limit is too small, just change it to a larger value.
Restart apache or add the following sentence in front of
$CACHE = cache_read('common.php');
@ini_set('memory_limit', '128M');
Set the memory size that php can use to 64M.
Recommended related articles: phpcms website building tutorial
The above is the detailed content of What should I do if phpcms cannot read the cache?. For more information, please follow other related articles on the PHP Chinese website!