PDA

View Full Version : How do you increase PHP Memory Limit?



suburbancook
2011-12-21, 07:05 AM
The current php memory limit of 41943040 bytes is too small as I am hitting the wall with Drupal. Their recommendation is 64M but they would even prefer 128M. I have tried to set this though the .htaccess file in my root drupal folder to no avail.

Is there a way I can do this or do I need myhosting tech to increase it for me?

I did find another .htaccess file in the webspace folder, but it is locked. I couldn't locate a php.ini file to edit the setting either.

suwunk
2011-12-21, 08:12 AM
Hi There,


Which hosting plan do you have? File Manager and FTP doesn't allow you to access php.ini

If you use VPS, You can try this.
SSH into your server
Log in as root.
Type the following and hit enter: vi /usr/local/lib/php.ini
Now that you’re in vi
Press the “i” key. This puts you in “insert” mode, which basically
allows you to edit things.
when you`ve done with modification
Press escape, then type :wq and hit enter. That says “save the file
and quit.”

If You`re in shared hosting, You should ask customer care to increase memory limit.
You can also try this module Drupal tweaks | drupal.org (http://drupal.org/project/drupal_tweaks)

Cheers

jeremya
2011-12-21, 01:43 PM
could you give it a shot now and let me know if you're still having trouble?

suburbancook
2011-12-21, 04:14 PM
I'm in shared hosting and don't have access to SSH. I will try sending a ticket. Wow, though, thanks for the quick response!!
(^_^)

suburbancook
2011-12-21, 04:16 PM
Also, it doesn't look like Drupal Tweaks has a Drupal 7 version, but thanks!