ID:               30058
 User updated by:  l_faillie at yahoo dot com
 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:

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


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

[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 :-(

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

[2004-09-11 00:00:06] [EMAIL PROTECTED]

Does setting the connection to passive mode help?

ftp_pasv($ftp_connection, true);


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

[2004-09-10 22:46:55] l_faillie at yahoo dot com

Description:
------------
Hi all,

I'm working on a script to update a web site using ftp_* functions
using CLI version of PHP.

Unfortunatly, it doesn't work because all calls to ftp_put() fail w/o
anything displayed. There is also some ftp_chdir() and ftp_pwd() in my
script and they work correctly : the problem is only w/ ftp_put().

I have added some puts() inside php's code, made some checks and I
think the problem comes from the scripting engine as
PHP_FUNCTION(ftp_fput) of ext/ftp/php_ftp.c  is never called.

I think also it's related to my own compilation environment under
Solaris 8 because I build PHP on my HP-UX 10.20 workstation at work and
I don't have this bug.

Questions :
- does someone know if there is issue w/ Solaris 8 or 1 year old GNU
tool ?

- where can I put breakpoint using gdb to know what's append just
before ftp_put is called ?

Thanks for your help.

Laurent




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


-- 
Edit this bug report at http://bugs.php.net/?id=30058&edit=1

Reply via email to