|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-10-30 07:14 UTC] j dot parree at net-communications dot de
We are getting the following undocumented error:
Warning: Unable to find ftpbuf 1 in /usr/local/httpd/htdocs/sportshop/admin/modules/porter/class/classProductImport.php on line 18
(Line: if(!ftp_fget($ftpLogin, trim($docName), $fp, FTP_BINARY)); )
This script is also beeing called from another script
on the same mashine, and there it works.
(We could nor get any information from search engines
or any of the php-mailing lists.)
-------------------------------------
In script (part of a class):
$ftpConn = ftp_connect($FTPDataHost);
$ftpLogin = ftp_login($ftpConn, $FTPDataUser, $FTPDataPass);
if($ftpConn && $ftpLogin){
$fp = fopen($tmpDataDir . "/" . trim($docName), "w");
echo "ftp conn : " . $ftpConn . "<br>";
if(!ftp_fget($ftpLogin, trim($docName), $fp, FTP_BINARY));
fclose($fp);
}
-------------------------------------
-> modules in php ... :
'./configure'
'--prefix=/usr'
'--bindir=/usr/bin'
'--libdir=/usr/lib'
'--with-config-file-path=/etc'
'--with-exec-dir=%{libdir}/php/bin'
'--with-pgsql=/usr'
'--with-mysql=/usr'
'--with-gd=yes'
'--with-tiff-dir=/usr'
'--with-jpeg-dir=/usr'
'--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6'
'--with-pdflib=/usr'
'--with-ldap=yes'
'--with-imap=yes'
'--with-imap-ssl'
'--with-zlib=yes'
'--with-bz2'
'--with-xml'
'--with-ttf'
'--with-t1lib'
'--with-mcal=/usr/include/mcal/'
'--with-sablot' '--with-readline'
'--with-ftp'
'--with-ndbm'
'--with-gdbm'
'--with-mcrypt'
'--with-gettext'
'--with-curl'
'--with-mm'
'--with-gd=yes'
'--with-qtdom=/usr/lib/qt-2.2.1/'
'--enable-versioning'
'--enable-yp'
'--enable-bcmath'
'--enable-trans-sid'
'--enable-inline-optimization'
'--enable-track-vars'
'--enable-magic-quotes'
'--enable-safe-mode'
'--enable-sockets'
'--enable-sysvsem'
'--enable-sysvshm'
'--enable-shmop'
'--enable-calendar'
'--enable-exif'
'--enable-ftp'
'--enable-memory-limit'
'--enable-wddx'
'--enable-filepro'
'--enable-dbase'
'--enable-ctype'
'--enable-debug'
'--enable-force-cgi-redirect'
'--enable-discard-path'
'--enable-sigchild'
'--enable-gd-imgstrttf'
'--with-openssl'
'--with-swf=./dist/'
'--with-apxs=/usr/sbin/apxs'
'i386-suse-linux-gnu'
-------------------------------------
Other information:
- Total script processing time = 0.034132000058889
- FTP-Settings on the remotehost were checked !
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 20 03:00:01 2026 UTC |
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);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);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);