68 Classifieds Forums
Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support > Image upload problems...
v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
(#1)
Old
Mikael Mikael is offline
Junior Member
Mikael is on a distinguished road
 
Posts: 26
Join Date: Apr 2006
Location: UK
Default Image upload problems... - 02-17-2007, 11:49 AM

Hi there,

We have a pretty busy site (4,500-ish visitors per day) but are having major problems with visitors uploading images. It is our number 1 complaint. What happens is the server times out frequently. We have a co-located server which we have full access to. I was wondering what the problem might be.

We generally ask anyone who is having difficulty to first try the Microsoft powertoy to resize problematic images and 9 times out of 10, this works fine. If they cannot for whatever reason, we ask users to email us images to upload on their behalf. This is becoming very inconvenient - especially on free ads!

I have a couple of theories as to the cause of the problem.
1. The site is so busy that the server struggles (unlikely as it is a pretty decent spec server housed in a large commercial data-centre)
2. We have php setup incorrectly - I believe the default file upload size accepted is 2M - I have tried changing this and increased the timeout. I have also changed the 'image settings' in the admin control panel to match the php config

Does anyone else have this problem?

We are being told by our users that our main competitors site has no problems with any images and perhaps we should take a leaf out of their book. (Their site is a bespoke .asp classifieds system)

Is it a server configuration problem?
or a problem with 68c?

Any help would be hugely appreciated!

Many thanks in advance,


Mikael
V3.1.5b Developer
www.racecarsdirect.com
Reply With Quote
(#2)
Old
bgordon bgordon is offline
Senior Member
bgordon is on a distinguished road
 
Posts: 111
Join Date: Aug 2006
Location: Georgian Bay, Ontario Canada
Question 02-19-2007, 10:49 PM

I too have been struggling with this exact same problem for months. I cannot find a common thread of problems since some users are okay but they report many tries and long upload times. Other users give up and email me their images (for the free ads....)

I have looked at the php files in the routine and cannot see anything out of the ordinary. Is there another way to upload files with php? The issues seems to be some kind of lag since when they press the submit button, it sits on contacting www.mysite.com in the status bar... like it is waiting for my server. When I open up a concurrent session to my server and request pages they are returned instantly.. no lag. I am convinced the problem is the scripts.

Any help from the gurus would be appreciated. I too have a solid ISP and solid hosting and the consistent problem is with simple uploads of 450k images (on average). It just seems to choke.


B.Gordon
v.3.1.5 Developer
www.canadaboatshopper.com
Canada Boat Shopper - Boats For Sale By Owner In And Around Canada
Reply With Quote
(#3)
Old
Mikael Mikael is offline
Junior Member
Mikael is on a distinguished road
 
Posts: 26
Join Date: Apr 2006
Location: UK
Default At least we are not crazy then :) - 02-20-2007, 10:12 AM

Hi there,

Thanks so much for posting that, I thought I was going crazy!

I hope we can resolve this very soon as we are planning on purchasing another 6 licenses of 68C for 6 other sites we wish to develop. We are holding off until we are sure that the image upload problem is resolved.

Thanks again to anyone who may be able to shed any light on this mystery.


Mikael
V3.1.5b Developer
www.racecarsdirect.com
Reply With Quote
(#4)
Old
suzkaw suzkaw is offline
Help you, I will.
suzkaw has a spectacular aura about
 
Posts: 1,696
Join Date: Mar 2006
Location: Belmont, NC
Default 02-20-2007, 10:40 AM

Hey guys. Do you know if they are uploading huge images? Or anything else that I might can try to duplicate the error?


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#5)
Old
Lhotch's Avatar
Lhotch Lhotch is online now
Moderator
Lhotch has a spectacular aura about
 
Posts: 1,447
Join Date: Mar 2006
Default 02-20-2007, 10:44 AM

One thing to consider, regardless of how fast your server is you are limited by the transfer rate of the system uploading the files and are also affected by any data transfer issues that may arise between them and your host.

PHP has a default script timeout limit and if the upload does not complete within a certain amount of time this will happen.

68c resizes images so it doesnt care what size the source image is (but php does have a max upload size limit) however with the image sizes coming from cameras now days if they dont reduce their size they may be uploading a 3000x2500 pixel image that gets resized to 400x375. Thats a lot of added bandwidth consumed for nothing.

Right now your php is set for upload_max_filesize = 8m. If it were me I would drop this down to like 1m(or less) and make sure to put a notice on the image upload page that uploaded images must be smaller than a certain size.
Reply With Quote
(#6)
Old
bgordon bgordon is offline
Senior Member
bgordon is on a distinguished road
 
Posts: 111
Join Date: Aug 2006
Location: Georgian Bay, Ontario Canada
Default 02-20-2007, 12:14 PM

In a case I was faced with yesterday, the image file size was 450kb. The physical pixel dimensions were 2250 x 1150 or something like that. I opened the image up in Adobe PS and resized it to 600 x 400 (the size that I have opted for all images) and was still having troubles. The script would hang or timeout and I would get a 500 error from my host indicating that the operation failed and to check permissions on the folder (were 777), check to make sure the script was not uploaded as ASCII (was not, checked this for all the related php scripts) and to check the .htaccess file.

If it helps, I was doing this from the admin console editing the ad, so I was using the admins image upload php.

Now... I know this problem happens for users too from whatever php script their routine the checkout step calls...

The frustrating part is that this cannot be reproduced and I don't know how to debug this... some verbose logging or maybe some status results displayed as the process goes along might be beneficial. Is this possible? Is there another way or process that we can use to upload images other than the generic php that would be compatible?


B.Gordon
v.3.1.5 Developer
www.canadaboatshopper.com
Canada Boat Shopper - Boats For Sale By Owner In And Around Canada
Reply With Quote
(#7)
Old
Lhotch's Avatar
Lhotch Lhotch is online now
Moderator
Lhotch has a spectacular aura about
 
Posts: 1,447
Join Date: Mar 2006
Default 02-20-2007, 12:26 PM

B.Gordon, couple things to check.

Look in your error log and see if you can find any more details on the error.

Another thing which may be the problem is that PHP uses a temp folder to store uploads before they are moved/copied to their destination. Depending on the host and the OS in use this folder may have a size limit and if a lot of people are uploading at the same time, this temporary folder may fill up causing the upload to error out. Perhaps your host can help you assess if this is the case.

If your currently using host wide temp space perhaps you can over ride this variable in php.ini and specify that your scripts should use a folder in your own web hosting space.
Reply With Quote
(#8)
Old
Mikael Mikael is offline
Junior Member
Mikael is on a distinguished road
 
Posts: 26
Join Date: Apr 2006
Location: UK
Default Error log message - 02-21-2007, 11:18 AM

Hi there,

This is the message in the error log from the server:

PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried t o allocate 11792 bytes) in /var/www/html/default/rcd2/includes/classes/images/class_upload.php on line 319, referer: http://www.racecarsdirect.com/usercheckout.php
Allowed memory size of 8388608 bytes exhausted (tried to allocate 135 bytes)

it seems to run out of memory, yet the image size is just 280k

Any thoughts?


Mikael
V3.1.5b Developer
www.racecarsdirect.com
Reply With Quote
(#9)
Old
Lhotch's Avatar
Lhotch Lhotch is online now
Moderator
Lhotch has a spectacular aura about
 
Posts: 1,447
Join Date: Mar 2006
Default 02-21-2007, 11:41 AM

Quote:
Originally Posted by Mikael View Post
it seems to run out of memory, yet the image size is just 280k

Any thoughts?
php has a set memory limit that is used to run scripts in. So if your site is real busy, regardless of what they are doing php can be hitting its memory limit. Since you have your own colocated system modify PHP's mem limit by editing the value for "memory_limit" in the php.ini file.
Reply With Quote
(#10)
Old
juven14 juven14 is offline
Moderator
juven14 has a spectacular aura about
 
Posts: 1,656
Join Date: Mar 2006
Location: NJ/NYC Area
Default 02-21-2007, 01:48 PM

You can also change it by adding something like this:

changes to 12mb
PHP Code:
ini_set("memory_limit","12M");
or

Removes limit
PHP Code:
ini_set("memory_limit",-1);


Regards,

John
mods.auscity.com
v3.1.5 Developer

�By perseverance, study, and eternal desire, any man can become great.� George S. Patton
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Browse error CHRD v3.1 Questions & Support 1 02-16-2007 03:28 PM
Add Image mason2287 v3.1 Questions & Support 1 02-16-2007 05:25 AM
Image Upload Popup CB v3.1 Questions & Support 1 01-02-2007 06:08 PM
Multiple Image Upload CB v3.1 Questions & Support 0 09-19-2006 02:47 PM
Phpnewads munky20 v3.0 Questions & Support 10 03-30-2006 07:59 PM



Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com