Fatalerror: Allowedmemorysizeof33554432bytesexhausted. Today, I changed a server to run php for a long time and I will find the Fatalerror: Allowedmemorysizeof33554432bytesexhausted prompt. next I will introduce the solution to this problem. Solution: after changing the server to run php for a long time, you will find the Fatal error: Allowed memory size of 33554432 bytes exhausted prompt. next I will introduce the solution to this problem.
Solution
Method 1 (recommended) change the value of memory_limit in php. ini to 120 M: memory_limit = 120 M.
Method 2: Add a line to the top-level PHP Script: ini_set ("memory_limit", "120 M ");
If I use a wordpress blog or not, my solution is a little different. let's share it with you.
1. Network method. it is said that this is applicable to versions earlier than 3.0. Edit the wp-config.php file, add
| The code is as follows: |
|
|
Define ('WP _ MEMORY_LIMIT ', '64m '); |
64 m can be higher. It can be 96 M, 128 M.
2. for versions later than 3.0, you don't need to change the source file if you want to modify the source file. Find the following code in the default-constants.php file under the wp-Ides Directory
| The code is as follows: |
|
|
Global $ blog_id;
// Set memory limits
If (! Defined ('WP _ MEMORY_LIMIT ')){
If (is_multisite ()){
Define ('WP _ MEMORY_LIMIT ', '64m ');
} Else {
Define ('WP _ MEMORY_LIMIT ', '32m ');
}
} |
Line 2: define ('WP _ MEMORY_LIMIT ', '32m'); change to 64 MB.
Internal error: Allowed memory size of 33554432 bytes exhausted prompt. next I will introduce the solution to this problem. Solution...