php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19390 alien
Submitted: 2002-09-13 08:36 UTC Modified: 2002-10-20 23:20 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: yura at freeweb dot ru Assigned:
Status: No Feedback Package: FTP related
PHP Version: 4.2.2 OS: WINXP,FReeBSD
Private report: No CVE-ID: None
 [2002-09-13 08:36 UTC] yura at freeweb dot ru
Ftp works very bad, sometimes ftp-get return error,but what error i don'y know.

So that is my script:
<?
$ftp_server="someserver";
$ftp_user_name="somelogin";
$ftp_user_pass="somepass";
$ftp_conn=ftp_connect($ftp_server);
$to_dir="htdocs/desktop/inc2/desktop/";
echo( date('d-m-Y H:i:s').'<BR>' );
$login_result = ftp_login($ftp_conn, $ftp_user_name, $ftp_user_pass);
if ((!$ftp_conn) || (!$login_result)) { 
        echo "FTP connection broken!<br>";
        echo "??????? ?????????????? ? ??????? $ftp_server ??? ?????? $ftp_user_name<br>"; 
        die; 
    } else {
        echo "CONNECT OK $ftp_server, ??? ?????? $ftp_user_name ???????";
    }
echo( date('d-m-Y H:i:s').'<BR>' );
 flush();
ftp_chdir($ftp_conn,$to_dir);
echo("ftp_chdir<br>");
echo( date('d-m-Y H:i:s').'<BR>' );
 flush();
echo( date('d-m-Y H:i:s').'<BR>' );
 flush();
$files=ftp_nlist ($ftp_conn,"");
echo("ftp_nlist<br>");
echo( date('d-m-Y H:i:s').'<BR>' );
 flush();
ftp_pasv($ftp_conn,1);
#for($i=0;$i<sizeof($files);++$i){
for($i=0;$i<sizeof($files);++$i){
if(substr($files[$i],0,3)=="cat" or $files[$i]=="new.inc")
        {
		echo $files[$i]."---".date("H:i:s")."<br>";
        if(file_exists("inc2/".$files[$i])){unlink("inc2/".$files[$i]);}
	echo( date('d-m-Y H:i:s').'<BR>' );
	 flush();
        if ( ftp_get($ftp_conn,"inc2/".$files[$i],$files[$i],FTP_BINARY) ) {
        	echo "DOWNLOADED FILE $files[$i]<br>";
			 flush();
	} else {
		echo "ERROR WHILE DOWNLOADING FILE $files[$i]<br>";
		 flush();
	}
	echo( date('d-m-Y H:i:s').'<BR>' );
        flush();
        }
}
?>
Result:
ftp_chdir
13-09-2002 13:37:26
13-09-2002 13:37:26
ftp_nlist
13-09-2002 13:37:26
13-09-2002 13:37:26

Warning: ftp_get: in /usr/local/apache/htdocs/wwwcgiru/get.php on line 37
ERROR WHILE DOWNLOADING FILE  cat114.inc
13-09-2002 13:38:56
13-09-2002 13:38:56 <-- LOOK HERE

Warning: ftp_get: in /usr/local/apache/htdocs/wwwcgiru/get.php on line 37
ERROR WHILE DOWNLOADING FILE  cat2.inc
13-09-2002 13:40:26 <-- THEN LOOK HERE
13-09-2002 13:40:26

Look for time,it differ on 1.5 minutes

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-13 08:38 UTC] kex_net at mail dot ru
PS: machine,which i try to connect very fast:
by another ftp clients all files in requested folder downloading above 3-5 seconds
 [2002-09-13 12:36 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-09-13 12:44 UTC] yura at freeweb dot ru
This is a bug or what?
WHere i can read about it?
 [2002-09-29 20:12 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip

Can you please try the snapshot.

 [2002-10-20 23:20 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2006-08-31 04:24 UTC] ss_kharay at yahoo dot com
problum is this when i use this  
echo date("d-m-Y");
syntax is show current date of my system in php page.
but when i upload this form then i show one day back please help me to solve the problum.
my e-mail is : ss_kharay@yahoo.co.in
Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC