ID: 30058 User updated by: l_faillie at yahoo dot com -Summary: ftp_put() fails Reported By: l_faillie at yahoo dot com -Status: Feedback +Status: Open Bug Type: FTP related Operating System: Solaris 8 PHP Version: 4.3.8 New Comment:
> add 'error_reporting(E_ALL);' as first line in your script > and also run > it on the CLI binary of PHP. Report here what error > messages you get. I have added this line but nothing is displayed. Also, I alway launch this script using the CLI binary ... because my script is a CLI tool. > Also, with what compiler did you compile PHP? (version!) $ gcc -v Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.1/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls --disable-libgcj --enable-languages=c,c++ Thread model: posix gcc version 3.4.1 It's the one from http://www.sunfreeware.com/ Previous Comments: ------------------------------------------------------------------------ [2004-09-28 23:26:52] [EMAIL PROTECTED] add 'error_reporting(E_ALL);' as first line in your script and also run it on the CLI binary of PHP. Report here what error messages you get. Also, with what compiler did you compile PHP? (version!) ------------------------------------------------------------------------ [2004-09-20 20:53:38] l_faillie at yahoo dot com Sample source code : #!/usr/local/bin/php <?php /**** * Parametres de connection ****/ // Pour RA $usr = 'le_user'; $pwd = 'le_passwd'; $srv = 'ra.chez.moi'; $sroot = '/web'; /**** * Ouverture du FTP ****/ $con = ftp_connect($srv) or die(1); ftp_login($con, $usr, $pwd) or die(1); ftp_chdir($con, $sroot) or die(1); echo '*D* Le repertoire courant est :', $home = ftp_pwd($con), "\n"; $fch='galerie/Italie/LacMajeur/Baveno/index.php' $dir = dirname($fch); $ndir = substr_count($dir,'/')+1; ftp_chdir($con, $dir) or die(1); echo ftp_pwd($con),' & ', getcwd(), basename($fch),"\n"; ftp_put($con, basename($fch), basename($fch), FTP_BINARY) or die("*F*pb de put\n"); ftp_close($con); echo "C'est fini !\n"; ?> Bye ------------------------------------------------------------------------ [2004-09-15 16:05:39] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2004-09-12 23:13:13] l_faillie at yahoo dot com I upgrade bison, sed and m4 to the lastest version and ... it's the same :-( ------------------------------------------------------------------------ [2004-09-11 00:44:54] l_faillie at yahoo dot com no, same result :-( ------------------------------------------------------------------------ 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/30058 -- Edit this bug report at http://bugs.php.net/?id=30058&edit=1