SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    Montreal
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Uploading huge file on server

    Hi,

    i'm creating a CMS for a client that want to upload some huge video file. In this case, I don't think that uploading the file from a form is the better way cause it can take several time.

    I look up at the FTP function of php but never tried it.

    Do uploading from a FTP connection is faster that the standard method?

    I also want to know if it's possible to open an ftp connection so the client have only to drop his file?

    thank alot

    turb

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im not positive, but i think ftp may be a bit slower than an upload form.

    if you wanted to use php's ftp functions, your client weould need to have php running on his local computer, or it cant access his files.

  3. #3
    SitePoint Zealot
    Join Date
    Oct 1999
    Location
    France
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Hijacking this thread, because I have the exact same problem! The client wants to upload large video files and she's not very computer-savvy (also uses a Mac). I thought I could use php ftp to get round form-based file upload limitations, but of course the file has to get from her local PC to the server first, duh!

    So I suppose unless I ask her to install and use an FTP client, I have to use a normal form upload. After experimenting, I seem to be able to override MAX_FILE_SIZE using .htaccess, but I'm also limited by POST_MAX_SIZE am I not? I see my host has this set to 55Mb at present!! Is it actually possible to upload 55Mb via a form??

    I suppose I could just try ...
    --
    Veronica Yuill
    Archetype IT

  4. #4
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    Montreal
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    if the upload_max_file is set to 55mb in the php.ini file, then you must be able to upload file of 55mb from a form.

    It'll take a while to load but it is supposed to work.

  5. #5
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Depending on host to host but try max execution time and post max size in the .htaccess. I've tested it up to 200mb on a php.ini set to 20mb max.

  6. #6
    SitePoint Enthusiast spamonkey8's Avatar
    Join Date
    Feb 2006
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Over a LAN, I've had HTTP file uploads work up to 250MiB, but I wouldn't recommend it at all unless your hands are completely tied in the matter.

    The FTP protocol has much less overhead than the HTTP protocol, which makes it noticably faster. For such large transfers, if the connection is interrupted, only FTP allows you to resume a partial upload. Lastly, you don't get a pretty progress bar with HTTP :-P

    I would make an FTP user account that gives them very limited access. Most OSs (Windows and Macs included) come with FTP clients that are passable, but picky/power users should seek replacements.

  7. #7
    SitePoint Evangelist -Oz-'s Avatar
    Join Date
    Nov 2001
    Location
    Phoenix, AZ, USA
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use a java solution: http://www.jupload.biz . Works great. Drag and drop, status bars, etc.

    For images it then processes through them after uploading via a php script.
    Oz
    GamersMark - On Target Gaming
    OzTheory - Programming and Web Solutions
    AmIBlocked - Check if you've been blocked on IM

  8. #8
    Always learning viveknarula's Avatar
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post

    if anyone saw http://www.jupload.biz i want to develop same kind of web application in PHP for a client , how can we develop this.

    any suggestions, comments

    REPLYyyy

  9. #9
    SitePoint Enthusiast spamonkey8's Avatar
    Join Date
    Feb 2006
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The J in JUpload stands for Java. It's a java applet that emulates a web browser HTTP file upload, but does it better. You can't make it in PHP.

  10. #10
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is there anything stopping your client using an FTP program? or even IE *shudder*
    Glass Obelisk - Web Design, Development and Hosting.

  11. #11
    Always learning viveknarula's Avatar
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    418
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    Actually i want to develop same interface of jupload. but for the download purposes. can't we ftp functions of the PHP??

    Thanx

  12. #12
    SitePoint Zealot
    Join Date
    Oct 1999
    Location
    France
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone for all those useful suggestions -- plenty to go on there! I've been away from the PC, but i did try a 7.5 Mb upload via the form and it failed (both on my dialup and the client's broadband connection). I need to investigate further and find out exactly why though -- haven't had time to do that yet.

    Yes, FTP would work, I'm just a little reluctant to talk this particular client through doing FTP transfers
    --
    Veronica Yuill
    Archetype IT

  13. #13
    SitePoint Zealot
    Join Date
    Oct 1999
    Location
    France
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still investigating: the 'error' element in the $_FILES array contains 0 even when the upload did not succeed, so it isn't much help. I've found the MAX_INPUT_TIME directive: "This sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads". But the default is -1. This means what?? Unlimited?

    Thanks!
    --
    Veronica Yuill
    Archetype IT

  14. #14
    SitePoint Zealot
    Join Date
    Oct 1999
    Location
    France
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by -Oz-
    I use a java solution: http://www.jupload.biz . Works great. Drag and drop, status bars, etc.

    For images it then processes through them after uploading via a php script.
    It looks nice -- but does it work on a Mac? The docs only mention IE and Firefox as possible browsers, but naturally my client uses Safari ...
    --
    Veronica Yuill
    Archetype IT

  15. #15
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could just make them a shortcut that goes directly to the required folder.
    Glass Obelisk - Web Design, Development and Hosting.

  16. #16
    SitePoint Zealot
    Join Date
    Oct 1999
    Location
    France
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Codecfault
    You could just make them a shortcut that goes directly to the required folder.
    err, huh? I must be missing something here, I don't understand how this solves my problem. Could you explain further?

    Thanks
    --
    Veronica Yuill
    Archetype IT


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •