Bug #13868 Updated: Unable to find ftpbuf 1 in ....
| From: | derick@php.net | Date: | Sun, 02 Jun 2002 17:51:30 +0000 |
| Subject: | Bug #13868 Updated: Unable to find ftpbuf 1 in .... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9185@lists.php.net to get a copy of this message | ||
ID: 13868
Updated by: derick@php.net
Reported By: j.parree@net-communications.de
-Status: Open
+Status: Closed
Bug Type: FTP related
Operating System: Suse 7.1 - oldwotan 2.4.3 #1
PHP Version: 4.0.4pl1
New Comment:
Please try the latest snapshot from snaps.php.net (the non stable one)
and reopen if this problem is not fixed.
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-10-31 06:19:27] j.parree@net-communications.de
Your site has some strange loading problems.
Sorry, for posting this for three times.
------------------------------------------------------------------------
[2001-10-31 06:16:19] j.parree@net-communications.de
A working example:
This example should download an html-file.
<?
class ftpimport{
function GetViaFTP(){
$FTPDataHost = "212.227.140.167";
$FTPDataUser = "anonymous";
$FTPDataPass = "asd@test.de";
$docName = "index.html";
$ftpConn = ftp_connect($FTPDataHost);
$ftpLogin = ftp_login($ftpConn, $FTPDataUser, $FTPDataPass);
if($ftpConn && $ftpLogin){
$fp = fopen($docName, "w");
echo "ftp conn : " . $ftpConn . "<br>";
if(!ftp_fget($ftpLogin, $fp, trim($docName), FTP_BINARY)) echo
"error";
fclose($fp);
}
ftp_quit($ftpLogin);
}
}
$newImport1 = new ftpimport; // this works
$newImport1->GetViaFTP(); // this works
$newImport2 = new ftpimport; // this causes the problem
$newImport2->GetViaFTP(); // this causes the problem
?>
A solution would be:
$ftpLogin = ftp_login(ftp_connect($FTPDataHost), $FTPDataUser,
$FTPDataPass);
Instead of:
$ftpConn = ftp_connect($FTPDataHost);
$ftpLogin = ftp_login($ftpConn, $FTPDataUser, $FTPDataPass);
------------------------------------------------------------------------
[2001-10-31 06:15:39] j.parree@net-communications.de
A working example:
This example should download an html-file.
<?
class ftpimport{
function GetViaFTP(){
$FTPDataHost = "212.227.140.167";
$FTPDataUser = "anonymous";
$FTPDataPass = "asd@test.de";
$docName = "index.html";
$ftpConn = ftp_connect($FTPDataHost);
$ftpLogin = ftp_login($ftpConn, $FTPDataUser, $FTPDataPass);
if($ftpConn && $ftpLogin){
$fp = fopen($docName, "w");
echo "ftp conn : " . $ftpConn . "<br>";
if(!ftp_fget($ftpLogin, $fp, trim($docName), FTP_BINARY)) echo
"error";
fclose($fp);
}
ftp_quit($ftpLogin);
}
}
$newImport1 = new ftpimport; // this works
$newImport1->GetViaFTP(); // this works
$newImport2 = new ftpimport; // this causes the problem
$newImport2->GetViaFTP(); // this causes the problem
?>
A solution would be:
$ftpLogin = ftp_login(ftp_connect($FTPDataHost), $FTPDataUser,
$FTPDataPass);
Instead of:
$ftpConn = ftp_connect($FTPDataHost);
$ftpLogin = ftp_login($ftpConn, $FTPDataUser, $FTPDataPass);
------------------------------------------------------------------------
[2001-10-31 06:13:56] j.parree@net-communications.de
A working example:
This example should download an html-file.
<?
class ftpimport{
function GetViaFTP(){
$FTPDataHost = "212.227.140.167";
$FTPDataUser = "anonymous";
$FTPDataPass = "asd@test.de";
$docName = "index.html";
$ftpConn = ftp_connect($FTPDataHost);
$ftpLogin = ftp_login($ftpConn, $FTPDataUser, $FTPDataPass);
if($ftpConn && $ftpLogin){
$fp = fopen($docName, "w");
echo "ftp conn : " . $ftpConn . "<br>";
if(!ftp_fget($ftpLogin, $fp, trim($docName), FTP_BINARY)) echo
"error";
fclose($fp);
}
ftp_quit($ftpLogin);
}
}
$newImport1 = new ftpimport; // this works
$newImport1->GetViaFTP(); // this works
$newImport2 = new ftpimport; // this causes the problem
$newImport2->GetViaFTP(); // this causes the problem
?>
A solution would be:
$ftpLogin = ftp_login(ftp_connect($FTPDataHost), $FTPDataUser,
$FTPDataPass);
Instead of:
$ftpConn = ftp_connect($FTPDataHost);
$ftpLogin = ftp_login($ftpConn, $FTPDataUser, $FTPDataPass);
------------------------------------------------------------------------
[2001-10-30 18:05:33] sniper@php.net
Please add a SHORT but complete and self-containing script
that uses some public ftp server. And with which this can
be reproduced.
--Jani
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/13868
--
Edit this bug report at http://bugs.php.net/?id=13868&edit=1