Home > Article > Backend Development > Solution to the inexplicable error when adding modules in Drupal (often occurs when there are many modules)_PHP Tutorial
The situation is as follows:
1. After clicking the save button, the page cannot be redirected normally, and a blank page appears;
2. Refresh the page, and many items in the navigation are gone, and items that still exist You can't even click to enter the normal page.
After testing many times and not finding any problems, I reinstalled and tested many times, and finally an error page appeared: "drupal Maximum execution time of 30 seconds exceeded database in /mysqli.inc". After looking at this file, I finally realized Found some light. After searching on Baidu, I found three solutions. Try them one by one and the problem will be solved.
Now write down these methods:
Method 1: Change the php.ini file of PHP and set the value of max_execution_time to a larger value.
Method 2: Use PHP code to change and call the ini_set() function to set, such as ini_set('max_execution_time', 1000). The call of this function can be added to Drupal's settings.php, but after the operation is completed, the final OK, the call to this function is cancelled.
Method 3: (I haven’t tried it yet) Find the my.ini (my.cnf) file in the root directory of mysql, open it and find the last line
[mysqld]
port=3306
Add below Above:
set-variable = max_allowed_packet=Set a larger value, such as 10M