ID:               30058
 Updated by:       [EMAIL PROTECTED]
 Reported By:      l_faillie at yahoo dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         FTP related
 Operating System: Solaris 8
 PHP Version:      4.3.8
 New Comment:

change the ftp_put() line in your script to this:

$retval = ftp_put($con, basename($fch), basename($fch), FTP_BINARY);
var_dump ($retval);

And tell us what you get now..


Previous Comments:
------------------------------------------------------------------------

[2004-10-01 18:16:14] l_faillie at yahoo dot com

> You said you don't get any output. But ftp_put() doesn't
> output anything at all..what do you expect it to output?

Whell, as this function fails and rise the die() clause of
'ftp_put() or die()', I'm expecting an error message saying ... why
ftp_put() fails. Like "remote host close the connexion" or something
like that.

> What does this output:
> # php -r 'ftp_put();'
$php -r 'ftp_put();'

Warning: ftp_put() expects at least 4 parameters, 0 given in Command
line code on line 1

------------------------------------------------------------------------

[2004-09-30 16:13:40] [EMAIL PROTECTED]

You said you don't get any output. But ftp_put() doesn't output
anything at all..what do you expect it to output?

What does this output:

# php -r 'ftp_put();'


------------------------------------------------------------------------

[2004-09-29 00:08:00] l_faillie at yahoo dot com

> 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/

------------------------------------------------------------------------

[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

------------------------------------------------------------------------

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

Reply via email to