Trouble uploading SELECTED Images Trouble uploading SELECTED Images
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Trouble uploading SELECTED Images

Started by Blain, February 13, 2009, 06:48:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Blain

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.   :) 


Blain

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.

Blain

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:    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.

Fabricio Ferrero

QuoteAny ideas?
Yes!


  • 1 - Post a link to your gallery.
  • 2 - Read the first link that Joachim told you to do.
  • 3 - Ask your web host to create the php.ini for you.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Blain

Quote from: Phill Luckhurst 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.

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

My hat goes off to my, my friend.

Joachim Müller

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?