This is a discussion on Image upload problems... within the v3.1 Questions & Support forums, part of the v3.1 Legacy Help & Support category; Hi there, We have a pretty busy site (4,500-ish visitors per day) but are having major problems with visitors uploading ...
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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, |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
Hey guys. Do you know if they are uploading huge images? Or anything else that I might can try to duplicate the error?
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#5
|
||||
|
||||
|
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.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#6
|
||||
|
||||
|
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 |
|
#7
|
||||
|
||||
|
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.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#8
|
|||
|
|||
|
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? |
|
#9
|
||||
|
||||
|
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.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#10
|
||||
|
||||
|
You can also change it by adding something like this:
changes to 12mb PHP Code:
Removes limit PHP Code:
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |