Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 09, 2012, 06:57:30 PM

Pages: [1]   Go Down
  Print  
Author Topic: Wordpress & NextGen Gallery  (Read 1341 times)
markr
Spaceship Captain
*****
Offline Offline

Posts: 112



WWW
« on: March 14, 2010, 04:35:48 AM »

Hello,

Perhaps someone can give me some advice here before I contact support.

I have been using wordpress with the NextGen Plugin, all has been working well, until recently.  after uploading a new gallery I received this error

"Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 3200 bytes) in /home/<home dir>/public_html/wp-content/plugins/nextgen-gallery/lib/gd.thumbnail.inc.php on line 176"

After posting on the nextgen forum, I got the response "Ask your hoster if you can increase the limit"
Has anyone came across this before, if so what exactly will I ask to be increased?

Many thanks.
Mark.


Logged

MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5083



« Reply #1 on: March 14, 2010, 07:50:24 AM »

256kB is rather small. You probably started out with much more (say 8 or 16MB) and used it all up. Anyway, search for php.ini and the settings you can put in it (something like memory_size or memory_limit). I'm not sure what the largest size that LP permits is, but try 8M and 16M values, and perhaps larger. Follow the instructions carefully for creating the php.ini file, and you will have to put a suPHP_ConfigPath entry in your .htaccess to point to the php.ini file.
Logged

markr
Spaceship Captain
*****
Offline Offline

Posts: 112



WWW
« Reply #2 on: March 14, 2010, 01:54:55 PM »

Thanks,

I presume that its the PHP.ini in the /public_html directory.

I cant see anything in this file thats like memory_size or memory_limit, can I just add it? what would the correct syntax be?
also would this be the corret value to add to .htaccess "SuPHP_ConfigPath  /home/<home dir>/public_html/php.ini"

Regards,
Mark
Logged

MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5083



« Reply #3 on: March 14, 2010, 02:10:58 PM »

If there's already a php.ini (note all lower case) in the public_html/ directory, there should already be a suPHP_ConfigPath entry in .htaccess. Otherwise, the existing php.ini is being ignored. If there is no suPHP_ConfigPath entry yet, it would be suPHP_ConfigPath /home/<home dir>/public_html (only give the path to it, not the file name).

Yes, you can just add the settings you need. Try memory_limit. Before changing php.ini, run this script:
Code:
<?php phpinfo(); ?>
It will tell you all your current settings. Make your change to php.ini, and run it again, to make sure the setting changed.

Look at the LP Wiki -- there's probably something there with information on php.ini.
Logged

Mitch
Berserker Poster
*****
Offline Offline

Posts: 12838


WWW
« Reply #4 on: March 15, 2010, 05:08:51 AM »

There ya go (for reference):

http://wiki.lunarpages.com/Create_php.ini

 Very Happy
Logged

New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!
markr
Spaceship Captain
*****
Offline Offline

Posts: 112



WWW
« Reply #5 on: March 15, 2010, 06:20:12 AM »

Thanks for your help, it is appreciated.
unfortunately it did not work.

anyhoo, I had a similar problem last week, (Error: Exceed Memory limit) after some digging around the fix was to remove the comments from
//@ini_set('memory_limit', '128M' from the file "gd.thumbnail.inc.php"

this appeared to work at the time.   grasping at straws I uploaded the original file (always back up) and it appears to be working again.

Hopefully this wont happen again....

Cheers
Mark.
Logged

MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5083



« Reply #6 on: March 15, 2010, 09:27:12 AM »

By uncommenting that line, you're doing exactly the same thing as
Code:
memory_limit = 128M
in your php.ini file. If it did not work in your php.ini file, that means that you did something wrong in setting it up (syntax, name, location, ConfigPath in .htaccess, etc.). Running the phpinfo() script I showed you before and after will show you if the change was processed.

By the way, I don't know if LP will permit 128MB of space -- you may be running with far less than that (32MB?).
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: