Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Trouble uploading SELECTED Images  (Read 3616 times)

0 Members and 1 Guest are viewing this topic.

Blain

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Trouble uploading SELECTED Images
« 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.   :) 
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

Blain

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Trouble uploading SELECTED Images
« Reply #2 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.
Logged

Blain

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Trouble uploading SELECTED Images
« Reply #3 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.
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Trouble uploading SELECTED Images
« Reply #4 on: February 13, 2009, 08:31:24 pm »

Quote
Any 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.
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Trouble uploading SELECTED Images
« Reply #5 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Blain

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Trouble uploading SELECTED Images
« Reply #6 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Trouble uploading SELECTED Images
« Reply #7 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?
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.