Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorrichard
    • CommentTimeJan 6th 2006
     
    This is a quick courtesy post, since it took me a bit to work out the solution - despite searching on here.

    I encountered problems when uploading or importing large files (>1.5mb), such as original digital camera shots.

    After a bit of hunting, reviewing the Apache error log, etc, I tracked it down to the PHP memory limit setting. This an excerpt from the phpthumb class config file (phpthumb is used to resize the images):

    // maximum number of pixels in source image to attempt to process entire image.
    // If this is zero then no limit on source image dimensions.
    // If this is nonzero then this is the maximum number of pixels the source image
    // can have to be processed normally, otherwise the embedded EXIF thumbnail will
    // be used (if available) or an "image too large" notice will be displayed.
    // This is to be used for large source images (> 1600x1200) and low PHP memory
    // limits. If PHP runs out of memory the script will usually just die with no output.
    // To calculate this number, multiply the dimensions of the largest image
    // you can process with your memory limitation (e.g. 1600 * 1200 = 1920000)
    // As a general guideline, this number will be about 20% of your PHP memory
    // configuration, so 8M = 1,677,722; 16M = 3,355,443; 32M = 6,710,886; etc.

    It is saying that the function runs out of memory for larger images. Not sure what the default setting is for PHP, but I increased mine from 8M to 48M and now can add very large images without a hitch.

    Incidentally, I did not alter the php.ini file, I inserted this code:

    ini_set("max_execution_time", "300");
    ini_set("memory_limit", "48M");

    at the top of the plog-globals.php file in the root directory (not the admin one).

    The increase in the max_execution_time is to contend with importing lots of files at once!

    THIS WILL NOT WORK IF PHP IS IN SAFE MODE, you will need to alter the php.ini file.

    Hope this helps, since this is a very frustrating problem with an otherwise excellent bit of software.
    •  
      CommentAuthormike
    • CommentTimeJan 6th 2006
     
    Thanks for that Richard, we will look at integrating this into the system.
    • CommentAuthorvallius
    • CommentTimeJan 7th 2006 edited
     
    How would I proceed if I'm experiencing this problem and my web host runs php in safe mode? I know my host will continue running in safe mode so the php.ini file will have to be edited.
    Is there a way for me as a user to get around it, or is it only my web host that can solve this issue?

    Regards, Vallius
    • CommentAuthorsigurdsn
    • CommentTimeJan 26th 2006
     
    Hey! Thanks for posting this solution. It might help me!

    But where do I insert;
    ini_set("max_execution_time", "300");
    ini_set("memory_limit", "48M");

    into plog-globals.php??

    Excerpt from my file:
    session_start();
    HERE???
    ini_set("arg_separator.output","&");

    Thanx in advance... Sigs!
    •  
      CommentAuthormike
    • CommentTimeJan 26th 2006
     
    Yeah, that works.
    • CommentAuthorsigurdsn
    • CommentTimeJan 27th 2006
     
    Well... I've tried that, but it doesn't seem to solve my problem.
    I still recieve a blank screen after pressing Import.
    Do you want to test it out in my gallery?

    Sigs!
    • CommentAuthorfreddylb
    • CommentTimeApr 16th 2006
     
    Hey, this is my first post here. and i must say that plogger is by far the best gallery tool out there.. well done guys.

    I have the same problem as you guys in this thread. But the limit for me is 400kb of size.

    My webhotel runs php in Safe mode so i cant use the tips you gave ubove.
    nore alter the php.ini file..

    Is there anyway else to get around this?
    • CommentAuthorniuserre
    • CommentTimeJul 24th 2006
     
    Thanks for this, fixed things for me straight away.
    • CommentAuthorBourdieu
    • CommentTimeAug 1st 2006 edited
     
    Thanks richard. It worked for me too.

    Maybe this modification should go in the next release
    • CommentAuthorryanclaw
    • CommentTimeMar 31st 2007
     
    Thanks Richard,

    It's been trying to solve this problem for almost 3 working nights till now, I try to search but to know avail, I tried your suggestions and BINGO it solves my issues..Keep up the good work.