TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-14-2011, 10:39 AM   #1 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default Image Upload Speed

I have a very general query hope someone can help me with. I have built image upload functionality into a website i run in the form of an image upload html form. I use PHP Image GD or whatever its called and add the images to an image folder while storing the relevant detail on a mysql database. I have also added a 1Mb file limit on any uploads. On my own windows laptop this image upload process takes a few seconds however on my actual live website it can take anything up to 10 seconds. I've added a javascript "image loading" image just to keep my users sane. before i contact my hosting company any ideas what specifcally would make this slow. is it a bandwidth issue, webspace issue, RAm issue? Any help much appreciated.
captainmerton is offline  
Reply With Quote
Old 03-21-2011, 09:03 PM   #2 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

It is the upload speed of your internet connection that would be causing the slow down. Nothing you can do to speed it up in your code/server. Unless your server's connection is slow but that is unlikely.
__________________
Eric
wGEric is offline  
Reply With Quote
Old 03-22-2011, 10:10 AM   #3 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

Sometimes in terms of displaying the actual webpage its slow i.e. the page appears then the pictures appear slowly. Would this be down to the server?
captainmerton is offline  
Reply With Quote
Old 03-22-2011, 05:41 PM   #4 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

It could be. What is your connection speed?
__________________
Eric
wGEric is offline  
Reply With Quote
Old 03-22-2011, 06:31 PM   #5 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

What i am trying to understand is I have a website where i allow users to upload images. The images are loaded into a file on the server and i store all the required additional information on a mysql table. However the images can be anything up to 1mb. I feel the website is starting to slow in its performance i,e, when i view a page the images seem to take a little longer to appear. Just trying to understand surely at some point the server is processing display of these images does the RAM need to be bigger?
captainmerton is offline  
Reply With Quote
Old 03-29-2011, 12:23 AM   #6 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Are you resizing the images or doing any processing on them? If so, make sure that code runs when users upload images. That way the image gets processed once instead of getting processed at every request.

If the images aren't going through any PHP when being displayed then the server is just taking some time to process the requests or your internet connection speed isn't fast enough to download everything as quickly as you would like.
__________________
Eric
wGEric is offline  
Reply With Quote
Old 03-29-2011, 08:33 AM   #7 (permalink)
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

So the users pick an image from their desktop using a standard html form then when they submit the form there is php code that resizes the image then saves it down to a folder on my hosted webspace then a mysql table is updated with the relevant image detail like the file location etc. I have a 1Mb size restriction on the images and i've noticed that when i upload smaller images the time taken is pretty short. Any guidance on handling image sizes? I guess if users keep uploading 1Mb images my site is going to get slow in terms of displaying those images?
captainmerton is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Reflections in PHP Rendair Advanced PHP Programming 17 11-30-2011 08:41 AM
Max Image width and height condition ignored by opera? SaintIsaiah General 9 06-12-2010 07:19 AM
Show Process While Image Upload dhaval Advanced PHP Programming 7 09-02-2009 11:24 AM
Preview: Upcoming Image Upload Script + Member System Gareth Show Off 2 07-10-2008 06:56 PM
The Big GD Guide - Part 2 Rendair Advanced PHP Programming 3 03-07-2008 12:14 AM


All times are GMT. The time now is 11:18 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design