Home > Article > CMS Tutorial > How to solve the problem that phpcms cache is not updated
How to solve the problem that phpcms cache is not updated
:
I am doing one recently Maintenance of previous projects, let me talk about this project. I did some secondary development of phpcms (recommended phpcms learning). I wrote a script to generate columns independently, which resulted in a large number of columns being added after running for a period of time. . Yesterday I added a few more columns, but suddenly I found that I couldn't update the cache.
When updating, only two lines of prompts are displayed. I went to update the column cache again. Oops, all the data came out. I scrolled to the bottom of the displayed SQL statement and saw - "MySQL server has gone away". It turned out that the cache was full.
Solution:
You need to configure the max_allowed_packet value in the my.ini file of mysql.
I am using wamp5, and there is no max_allowed_packet attribute in my.ini by default. I can only add it myself. I checked and the default is 1M. Generally, everyone sets it to 16M. Then add a "max_allowed_packet=16M" at the end of the file and it's OK. Now restart the server and update the cache. Is it completely normal?
If you need phpcms imitation site tutorial, please pay attention to the phpcms tutorial column.
The above is the detailed content of How to solve the problem that phpcms cache is not updated. For more information, please follow other related articles on the PHP Chinese website!