Home > CMS Tutorial > PHPCMS > body text

What should I do if phpcms cannot read the cache?

angryTom
Release: 2020-02-15 11:32:42
Original
2390 people have browsed it

What should I do if phpcms cannot read the cache?

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);
Copy after login

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');
Copy after login

@ini_set('memory_limit', '128M');
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!