FTP/PHP error when online

Discussion in 'PHP' started by cbisson, Jul 31, 2007.

  1. cbisson

    cbisson New Member

    Joined:
    Jun 28, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I need to make a little web application for a client who needs to upload multiple files related to a certain software. Some of the files may easily be over 50Mb.

    I'm using FTP functions of php to do so. When I test locally and transfer the files on an online server, the files are transfered correctly. When I test online to upload on the same online server, the file just doesn't get transfered.

    I checked if FTP was enabled and it is, and they have php 4.

    I also tried on different servers and always seem to get stuck once online, so maybe there is something I'm missing here that I have to do when online???

    Thank you for your help,

    Chris
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    When you test it locally, the local network is faster than the online one, so I guess the online version gets timed out for large files! Set the time limit for your script!
     
  3. cbisson

    cbisson New Member

    Joined:
    Jun 28, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for your reply,

    actually I already did set the lmit to "none".

    I even tried testing with little 200Kb files and it still doesn't work.


    Chris
     
  4. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    use
    PHP:
    set_time_limit(0);
    Try debugging for FTP messages!
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,345
    Likes Received:
    382
    Trophy Points:
    83
    Do you have the upload enabled in your web server you are trying to upload?
     
  6. cbisson

    cbisson New Member

    Joined:
    Jun 28, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    I already use set_limit(0) like I said, and yes FTP is enabled!

    It there a way I can get specific error messages from the FTP???

    I mean I return my own error message when the upload was not successful (either with ftp_put or ftp_nb_put)which doesn't tell me more that the file couldn't be uploaded, but an error coming from FTP saying like "wrong path " or whatever would be helpful!

    Chris
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice