From: ashraf_ker at yahoo dot com Operating system: windows xp PHP version: 5.2.9 PHP Bug Type: FTP related Bug description: I ttryd to upload 1 file to server but the error wil occur
Description: ------------ the error is: 1). ftp_put() expects parameter 1 to be resource, string given in D:\xampp\htdocs\ftp\testftp.php on line 10 2). ftp_close() expects parameter 1 to be resource, string given in D:\xampp\htdocs\ftp\testftp.php on line 15 Reproduce code: --------------- --- >From manual page: faq --- <?php //error_reporting(0); $conn_id="ftp.vidhyalokam.com"; $destination_file="/public_html/test/"; $source_file="NEWS"; // ftp_pasv( $ftp, 1); $upload= ftp_put($conn_id,$destination_file,$source_file,FTP_ASCII); if (!$upload) {echo"sorry, didn't work.";} else {echo"OK!";} ftp_close($conn_id); ?> Expected result: ---------------- Expecting that all the files of Directory "NEWS" upload to server in "/public_html/test/" -- Edit bug report at http://bugs.php.net/?id=47792&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47792&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47792&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47792&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47792&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47792&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47792&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47792&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47792&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47792&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47792&r=support Expected behavior: http://bugs.php.net/fix.php?id=47792&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47792&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47792&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47792&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47792&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47792&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47792&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47792&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47792&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47792&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47792&r=mysqlcfg