Image upload issues

11 posts by 4 authors in: Forums > CMS Builder
Last Post: March 25, 2012   (RSS)

By beckstar - March 23, 2012

Hello Moderators,

I've recently installed cmsb 2.13 and 2.14 for two websites and I am having similar issues uploading images. Both sites are hosted by networksolutions.

Issue 1: Each time I upload an image 1MB or over it generates the following error -

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3000 bytes) in

/data/26/2/23/12/2675175/user/2937412/htdocs/cms/lib/image_functions.php on line 43

Issue 2: At times the lightbox pop-up window that displays the thumbnail image and the field for caption etc comes up blank and the screen freezes; doesn't respond to the ESC key. The only thing I can do at that point is a refresh to get rid of it. This happens sometimes even for images under 1MB. I've even disabled the flash uploader and yet the problem remains the same.

Issue 3: Quite frequently, I get the automatic database connection error page generated from the CMS and have to keep refreshing in order to get to the pages that I am trying to view. These sites are not live and I am the only one connecting to them so I am not sure why this happens so frequently.

I've attached the phpInfo page generated from the CMS as the issue may be with the host so at least you can check for compatibility issues.

I really need some help with these issues, as the deadline for delivery of these sites are drawing near. One as early as Monday morning.
Attachments:

admin-php.htm 60K

Re: [beckstar] Image upload issues

By (Deleted User) - March 23, 2012

Hi beckstar,

My first thought is to re-upload all the cmsb files and make sure they all upload properly - we've had issues with networksolutions hosted sites not being able to upload some files from the cmsb lib and most problems with the image uploader seem to stem from that.

Could you let me know the sites that are experiencing these errors so I can have a quick look and see what's happening? It'd be best to use the second level support request http://www.interactivetools.com/support/ to send details over (I won't need the ftp info, just the logins so I can have a quick look around).

Thanks,

Tom

Re: [beckstar] Image upload issues

By Dave - March 24, 2012

Hi beckstar,

It's because your web host has a memory limit of approx 32 megs and CMSB is running out of memory when it's trying to resize the uploaded images.

By default CMSB will resize uploaded images and/or create thumbnails. Images are highly compressed so even a 1 meg image can take over 10megs in memory (and more if we need to create copies for resizing).

The first thing I'd try is editing the upload field in the field editor and turning off any resizing or thumbnailing options.

If that turns out to be the issue then you could try turning on only some resizing options to stay under the memory limit, setting a limit in the field editor of a max upload size of under 1meg, asking your host to up your memory limit, or switching hosts.

Hope that helps, let me know any questions.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Image upload issues

By beckstar - March 24, 2012

Thanks Dave, I suspected that was the issue. It's unfortunate because I have quite a lot of sites hosted with them running CMSB. I may now be forced to seek another host, as I believe that my clients shouldn't be forced to resize all images prior to uploading. Furthermore, most of them lack these skills. They just shoot and upload.

Are there any prefered hosts that Interactive tools can recommend? Also, is it possible for the installation to prompt us to certain critical issues as this? For instance, approximately how much memory would be required to process a 5MB image.

Finally, are there any plans to include an image manager/editor in the future either as part of the core app or as a plugin?

Thanks again, I do believe you guys are doing a great job :)

Re: [beckstar] Image upload issues

By nmsinc - March 25, 2012

Hi beckstar,

I had the very same issue with two seperate hosts. I have now moved all my sites to Verio http://www.verio.com/ .

We use their VP servers with c-panel. This option allows us to makes changes to the server including upload limits which we have set at 2.mg and that cured our problems with the server time-outs during large uploads. Their prices are very good as well.

Also, the support is very good and their claim of 99% uptime is accurate.

nmsinc
nmsinc

Re: [nmsinc] Image upload issues

By beckstar - March 25, 2012

Hi nmsinc,

I believe I'll have to move to a VPS soon as it's difficult to keep up with these hosts and changing policies. I did some research and discovered that I can actually override the memory settings for Network Solutions via a cgi script. I am now up to 128MB and all seems fine.

Thank you all for you replies.

Re: [beckstar] Image upload issues

By Dave - March 25, 2012

Hi Beckstar,

>I did some research and discovered that I can actually
>override the memory settings for Network Solutions via
>a cgi script. I am now up to 128MB and all seems fine.

Can you post more about that? I'm curious how that works and it's probably something we'll have to deal with again in future.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Image upload issues

By beckstar - March 25, 2012

Hi Dave,

I've attached a copy of the ini file that can be found in their cgi-bin folder. This is what allows the override to be done. You can see that I increased my memory to 128MB.

The path from the site root in each account is as follows:

/cgi-bin/.php/php.coalesced.ini

I hope this will be helpful to many others and that Network Solutions does not change this policy anytime soon.
Attachments:

php-coalesced.ini 2K

Re: [nmsinc] Image upload issues

By beckstar - March 25, 2012

I don't believe you can actually go as deep as the server host root. This root is for your account folder ( / ) considering that these accounts are on a shared server.

Remember the web site root folder is /htdocs which is one of the folders in your account root directory. Hence the structure of the account directory would be typically:

/htdocs
/cgi-bin
/backup

The default FTP that they provide in the FTP Manager usually takes you to your account root. Use a FTP client to login and access the /cgi-bin folder to get to the /cgi-bin/.php where the php.coalesced.ini file is located. You can then edit the file in notepad or any text editor of your choice. After that you can log into your CMS account and check the phpinfo under the General settings to confirm that the memory_limit setting has been increased.

I hope this helps.