Jump to content

Image help


Distant_storm

Recommended Posts

I have been having problems with my image stuff...

 

Ok heres what my system does...

 

Uploads image.. resizes and saves,gets rid of gd image stuff, addswatermark and saves, gets rid of unwanted gd image data, saves

 

However my upload is set to 2M. However I don't think this is the issue.

 

If I upload an image that is only 1.1 mb i get this error message.

 

Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 2816 bytes) in /XXX/XXX/XXXX.php on line 89

 

Line 89 onward is ...

 

$file_allocation= ".." . $base_url_temp . "/" . $_FILES['photofile']['name'];

$file_allocation_new = ".." . $base_url_temp . "/1" . $_FILES['photofile']['name'] ;

switch ($file_type) {

case "jpg":
$src = imagecreatefromjpeg($file_allocation);
break;

case "gif":
$src = imagecreatefromGif($file_allocation);
break;

case "png":
$src = imagecreatefromPng($file_allocation);
break;
}

 

Would it help if i put parts of the script into a new script ?

 

Or do i need to do something else?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.