forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: Blain on February 13, 2009, 06:48:07 am

Title: Trouble uploading SELECTED Images
Post by: Blain on February 13, 2009, 06:48:07 am
Greetings all,

Currently, I am coming across a certain problem when uploading pictures, both in batch and one at a time.

I receive this error on certain pictures:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11232 bytes) in /home/celebrit/public_html/gallery/includes/image_utils.php on line 80


I have already went into CONFIG and changed the MAX FILE SIZE as well as the MAX FILE WIDTH and everything else I could possibly think of. I changed them to ridiculously high numbers, so the error (if I am reading it correctly) which is saying there is not enough memory allocated is bogus.

I'd really appreciate some help. I have a deadline to meet with this project, so a swift response and some help would be appreciated.


Thanks, mates.   :) 
Title: Re: Trouble uploading SELECTED Images
Post by: Joachim Müller on February 13, 2009, 08:17:34 am
Read http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#ErrorAllowedMemorySize and http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_support
Title: Re: Trouble uploading SELECTED Images
Post by: Blain on February 13, 2009, 06:33:27 pm
Great, that explains everything. I cannot seem to find where php.ini is. Can someone with the immediate knowledge, please bestow it upon an eternally grateful soul!

It's much appreciated.
Title: Re: Trouble uploading SELECTED Images
Post by: Blain on February 13, 2009, 08:22:26 pm
Now I am receiving this error when attempting to upload a file which exceeds the memory limit:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 11232 bytes) in /home/celebrit/public_html/gallery/include/picmgmt.inc.php on line 261


So either another error has found its way to me which means I have 2 errors (this one and the one in my previous post) or perhaps just this one (doubtful). I have reviewed /home/celebrit/public_html/gallery/include/picmgmt.inc.php on line 261 and nowhere does it give me the option to simply increase a default value, say from 8mb to 32mb or whatever. Line 261 should be somewhere within the following code:
Code: [Select]
   case "gd1" :
            if (!function_exists('imagecreatefromjpeg')) {
                cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed', __FILE__, __LINE__);
            }
            if ($imginfo[2] == GIS_JPG)
                $src_img = imagecreatefromjpeg($src_file);
            else
                $src_img = imagecreatefrompng($src_file);
            if (!$src_img) {
                $ERROR = $lang_errors['invalid_image'];
                return false;
            }
            $dst_img = imagecreate($destWidth, $destHeight);
            imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $srcWidth, $srcHeight);
                        touch($dest_file);
            $fh=fopen($dest_file,'w');
            fclose($fh);
            imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
            imagedestroy($src_img);
            imagedestroy($dst_img);
            break;

No clue what to fix and I sure as hell do not see any numbers within the code to adjust. Any ideas?

In addition, I have also tried to create a text file of php.ini just simply: memory_limit = 32M -- This, however, has led to nothing, perhaps because I have no clue where to put the text doc. Any help here would also be appreciated.


Cheers and a hardy thanks to anyone willing to take a seat and help.
Title: Re: Trouble uploading SELECTED Images
Post by: Fabricio Ferrero on February 13, 2009, 08:31:24 pm
Quote
Any ideas?
Yes!

Title: Re: Trouble uploading SELECTED Images
Post by: phill104 on February 13, 2009, 09:28:16 pm
You can find where your php.ini file is by going to admin tools and clicking the phpinfo option.

You can only change it if you have full root access usually though some hosts do allow you to have your own php.ini. Ask them and see.

If you do have root access you will need to restart php for the change to take effect.
Title: Re: Trouble uploading SELECTED Images
Post by: Blain on February 13, 2009, 10:45:31 pm
You can find where your php.ini file is by going to admin tools and clicking the phpinfo option.

You can only change it if you have full root access usually though some hosts do allow you to have your own php.ini. Ask them and see.

If you do have root access you will need to restart php for the change to take effect.

Exactly the reply I'm sure everyone who has ever had this question would desire.

My hat goes off to my, my friend.
Title: Re: Trouble uploading SELECTED Images
Post by: Joachim Müller on February 17, 2009, 10:51:57 am
What do you expect? php.ini is a webserver configuration file, not a file that comes with coppermine. You could have asked as well "in which street do I live?". We can't tell you, as we're not mind readers. Your reply is totally uncalled for, please review your attitude if you want continued support, will you?