-
Memory Limit
I am running a DRUPAL site and I am unable to load a large module. The error message is related to the memory limitation. According to the DRUPAL support staff, the following is the area of concern. Is there some way I can reset or resize the memory on the server?
The DRUPAL help item is as follows:
_________________________________________
That indicates that Drupal needed more memory than PHP was allowed to give it.
Increase PHP's memory limit, either by adding:
memory_limit = 16M to your php.ini file (recommended, if you have access)
ini_set('memory_limit', '16M'); in your sites/default/settings.php file
php_value memory_limit 16M in your .htaccess file in the Drupal root
Slightly more instructions on increasing PHP memory on your server in the installation guide.
Some hosts allow a PHP.ini in the root of your site. Other hosts will not allow any modification of your capacity at all.
Depending on the amount of modules you have enabled and their 'impact' on the site you may need to increase the memory_limit even more (sometimes to 32 MB or more). Image processing often takes a lot of memory, as can working with any large files. Experiment with what memory value works for your needs.
Clearly, if your error was memory size of 16777216 bytes exhausted (16M) in the first place, then you are going to have to be bumping the limit up even higher than that. Do the binary thing and double it to 32M.
You may need to restart your server before the php.ini settings take effect.
Note: Do not just set an arbitrarily high number just to avoid this potential problem - it may limit your ability to have multiple simultaneous connections run efficiently, and simultaneous connections are important on webservers.
-
Edit the php.ini file that's in your public_html directory to reflect a higher memory limit. If you don't have one at all, go to Control Panel, PHP Config, the second section, and click the box to get the default version. Then, in that same window, choose the second option in the top section, "PHP 5 (Single php.ini)."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules