Cuts off with no errors

Recommend this page to a friend!

      Advanced FTP client class  >  All threads  >  Cuts off with no errors  >  (Un) Subscribe thread alerts  
Subject:Cuts off with no errors
Summary:Files just stop uploading w/o any indication of an error.
Messages:5
Author:Laura Thomas
Date:2007-07-13 17:00:26
Update:2007-07-17 20:40:57
 

  1. Cuts off with no errors   Reply   Report abuse  
Picture of Laura Thomas Laura Thomas - 2007-07-13 17:00:26
Hi

This class has been the answer to my prayers! It was so easy to implement and use - thank you for including documentation and an example of it working.

My question is this ... I'm using this class to upload photos from a computer running WAMP to the server. It works awesome when the directory I give it has a limited number of photos. However, when I get to a directory with approximately 40 photos, it just stops. Usually around the 20th photo. I turned on Verbose and LocalEcho so I could see what's going on, but the output just stops with no indication of an error.

I'm sure this has nothing do with the functioning of the class (unless there's some setting I'm missing), but I don't know a lot about how ftp works. Anything anyone can suggest would be helpful! I am able to ftp all 40 files at once using CuteFTP, so it's not an issue with size or quantity.

Any ideas? Help would be greatly appreciated!!!!

Laura
PS. When I have Verbose and LocalEcho turned on, how come it all runs together without any linebreaks? It's very hard to read, and I haven't figured out how to fix that.

  2. Re: Cuts off with no errors   Reply   Report abuse  
Picture of Alexey Dotsenko Alexey Dotsenko - 2007-07-17 12:54:30 - In reply to message 1 from Laura Thomas
Hello
That is strange problem. I use it to upload up to 50 different files and it work fine. Try this:
1. PHP has execution time limitation ( default 30 sec ). May be your script work more than this time...try disable this limitation using
set_time_limit(0);
at the beginning of upload

2. If this not help send me to e-mail result of
$list=$ftp->rawlist("<source folder>", "-lA");
print_r($list);
if($list===false) echo "LIST FAILS!";
else {
foreach($list as $k=>$v) {
$list[$k]=$ftp->parselisting($v);
}
print_r($list);
}

and of course what show script whem locvalecho and verbose enabled

  3. Re: Cuts off with no errors   Reply   Report abuse  
Picture of Alexey Dotsenko Alexey Dotsenko - 2007-07-17 13:03:14 - In reply to message 1 from Laura Thomas
About linebreaks...if you use your browser to view debug information do not forget to use <pre>...</pre> tags around ... browser do not show break line on line endings..it wait for <br> tag. <pre> fix this

  4. Re: Cuts off with no errors   Reply   Report abuse  
Picture of Laura Thomas Laura Thomas - 2007-07-17 20:40:04 - In reply to message 2 from Alexey Dotsenko
Alexey

Thank you! You just made my day!! You were correct about it timing out and that one line of code fixed it.

This is a great class and I know I will be using it again!

Thanks for all of your hard work,
Laura

  5. Re: Cuts off with no errors   Reply   Report abuse  
Picture of Laura Thomas Laura Thomas - 2007-07-17 20:40:57 - In reply to message 3 from Alexey Dotsenko
Also, the <pre></pre> tags helped too! It is much easier to read and debug now. Thanks!!!!

 

For more information send a message to info at phpclasses dot org.