close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

yikes my client cant upload images

Thread began 4/25/2012 8:30 am by Christopher West | Last modified 4/26/2012 4:32 pm by Christopher West | 4255 views | 12 replies |

Christopher WestCommunity Expert

yikes my client cant upload images

This is odd, as I tested it before and images seemed to upload fine. she sent me the image that she was have trouble with, its a JPG file with the name "website pic 2009 058.jpg - I also tested this image ans after around 10 seconds or so I get the following error message:


Fatal error: Out of memory (allocated 59768832) (tried to allocate 22464 bytes) in /homepages/28/d402258082/htdocs/projects/dinky/webassist/file_manipulation/helperphp.php on line 862


any thoughts to why this is? because previous images were able to upload.

The filename is being renamed to my SKU number in the database. Im attachinging the code as well in case there is something i missed:

Attached Files
update-products.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you probably have the upload set to resize images which can take quite a bit of memory on the server, sometimes more than the php.ini memory limit will allow.

add the following code at line to increase the memory limit:

php:
<?php

ini_set
("memory_limit""256M")
?>
Sign in to reply to this post

Christopher WestCommunity Expert

ok further testing..it seems that the reason is that the image that im trying to upload is of a resolution of 5616x3744 (24)bit its only a 1166kb jpg file (was a photo taken for a product from a pro photographer and has lots of white in the photo hence small file size).

my file upload will resize the image to 400pixels wide if i can remember. I have tested it with larger file sizes and with resolutions of around 2000x1333 and that works - so the problem is that the issue is to do with very large resolutions (im guessing).

any thoughts on suggestions on getting this resolved?

Sign in to reply to this post

Jason ByrnesWebAssist

see my previous reply

Sign in to reply to this post

Christopher WestCommunity Expert

Hi Jason, what line should I add that code to (im assumning you meant add it to the attached file I sent. or could it be the file that the error message was refering to?

regards

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

line 1 of the page you applied the upload behavior to.

Sign in to reply to this post

Christopher WestCommunity Expert

I put that line of code on line one of the file i attached and i still get the error message:

Fatal error: Out of memory (allocated 59768832) (tried to allocate 22464 bytes) in /homepages/28/d402258082/htdocs/projects/dinky/webassist/file_manipulation/helperphp.php on line 862

:(

Sign in to reply to this post

Jason ByrnesWebAssist

it's posible that the server does not have enough memory available to give you, or that the host has disabled the ability to dynamically set the memory limit.

you will need to contact the host for further assistance.

Sign in to reply to this post

Christopher WestCommunity Expert

humm well the images are less then 2mb (and i think the hosting could be set to 2mb) ..so that full under the limit...however i did take a look at the folder via FTP and noticed that there are temp images uploaded from the unsuccessful upload and their seem to be in pairs...with the second being [random alpha-numeric name]TMP.jpg so the files seem to be uploaded...just in pairs...if you were to add the total file size of both pairs together then would exceed the 2mb limit (they are 1166kb each)...this is the only logical explanation i can think off because file seems to be uploaded (just in a temp state).

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

the problem is caused by the memory needed to by the server to resize the images. IT has little to do with the file size. The error is a memory limit error. the server is needing to use more memory than is available to resize the images.

for resizing, the upload script uses the GD library which can be memory intensive, especially as you say the images have a high resolution.


it s a pretty clear error message:

Fatal error: Out of memory


the server has run out of available memory trying to resize the images.

The line of code i provided should increase the amount of memory the server will allow php to use.

If it is not working, there are 2 possible reasons:
1) The server does not have that much physical memory installed

2) The host has turned off the ability to set the memory limit through the ini_set command.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...