We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4626
    • 57 Posts
    Hi, could it be that MaxiGallery doesn’t call imagedestroy? I haven’t installed MaxiGallery yet (will be doing it later this week), but after a quick search I see that neither Thumbnail.class.php nor class.imagemask.php contain a routine to destroy the image (free up the memory) whilst class.dropshadow.php does (via $ds->flushimages(); ). Even if this doesn’t solve the whole problem maybe it could let you hande more or larger images...

    Just an idea – though my knowledge of image manipulation is quite limited...
      • 7923
      • 4,213 Posts
      Quote from: carlholmberg at Mar 12, 2007, 04:23 AM

      Hi, could it be that MaxiGallery doesn’t call imagedestroy?
      Yes, I looked at that yesterday also. The thumbnail class does not use image destroy and I will modify the maxigallery class to destroy the generated images, but I think it will still need much memory.

      Quote from: carlholmberg at Mar 12, 2007, 04:23 AM

      Just an idea – though my knowledge of image manipulation is quite limited...
      My knowledge about image manipulation is also quite poor. Those classes that maxigallery uses (watermark, image mask and dropshadow) are from phpclasses and I haven’t modified them at all (other than the recent change to not set memory_limit if it’s already high enough)


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 25876
        • 79 Posts
        I’ve got the same problem.

        Is there a solution out there yet?

        I get
        Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 8192 bytes) in /home/.../maxigallery/watermark/Thumbnail.class.php on line 183

        but ONLY if i have placed a php.ini with the following content in every folder back to /html
        upload_maxfilesize = 2M


        I just want to upload pictures with more than 1MB ...
        without the php.ini’s i keep getting a 500-error ...

        don’t know what to do to upload bigger pictures;

        But additionally one thing seems strange ... I get this errors with bigger images, BUT they are uploaded on my FTP in their full size and if I download them again they are normally watchable ...
        I don’t understand this ...
          • 4310
          • 2,310 Posts
          No solution as yet!
          As a workround I’ve uploaded via MaxiGallery a smaller version of the picture say 640 x400.
          This creates the thumbnail, Database entry etc.
          Then FTP’d up a larger one to overwrite it.
          This works fine.
          Regards
          David
            • 7923
            • 4,213 Posts
            Hmm.. I thought that I looked into this already and fixed it somehow, but maybe not as I haven’t replied here. It would be best to have all the bug reports in maxigallery trac site so I remember them.


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 25876
              • 79 Posts
              yea i’ve done the same @bunk, but that ain’t a long-term sollution ...
              lets hope doze finds his solution again wink
                • 7923
                • 4,213 Posts
                Could you try the code that is now in SVN? If you don’t have svn client, just download maxigallery.class.php and replace your copy with it.


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 4310
                  • 2,310 Posts
                  Hello Doze,
                  I’ve tried the new file but above 200kb file size it fails and returns a blank screen in the Manager in 0.9.5
                  No picture is uploaded.
                  Sorry!
                  David
                    • 7923
                    • 4,213 Posts
                    It works fine in my local environment with these settings:

                    max_execution_time 1200
                    max_input_time 60
                    post_max_size 8M
                    upload_max_filesize 8M

                    memory_limit is not defined and I guess it’s 128M by default, but not that much is needed.

                    I can upload at least 4MB images.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 25876
                      • 79 Posts
                      So well i’ve tried it out on my FTP putting a customized php.ini everywhere containing

                      memory_limit = 128M
                      max_execution_time 1200
                      max_input_time 60
                      post_max_size 8M
                      upload_maxfilesize 8M


                      and the modified maxigallery.class.php

                      it worked on a 600KB pic, failed on a 700KB one, BUT again the 700KB pic was uploaded on the FTP but it gave me a 500-error and no tn_ was created;
                      Then I tried a 1MB pic, error 500 again but the pic was uploaded to the ftp and the thumb was chreated, too

                      Why?? So whats the problem when the pics get uploaded anyway ... why the error?