2012年3月2日 星期五

[SOLVED]: Fatal error: Allowed memory size of 33554432 bytes exhausted (Drupal 7 on XAMPP)

In XAMPP, the memory limit for php is set 32MB by default. It would cause a Fatal error in Drupal that runs on XAMPP for the development.

Example
Fatal error: Allowed memory size of 33554432 bytes exhausted
D:\xampp\htdocs\sites\all\modules\ctools\plugins\export_ui\ctools_export_ui.php


Solution
We can resolve the problem by increasing the memory limit in the php.ini file.

Step 1. Locate the php.ini file in XAMPP
e.g. D:\xampp\php\php.ini
 

Step 2. Search for the keyword: memory_limit and replace it in the following way


max_execution_time = 60     ; Maximum execution time of each script, in seconds
max_input_time = 60    ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M 256M     ; Maximum amount of memory a script may consume (16MB)




 Step 3. Restart the Apache via the Control Panel XAMPP


Step 4. Done and check by the phpinfo.php











沒有留言:

張貼留言