ID:               25063
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gilem at wsg dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: linux
 PHP Version:      4.3.3RC3
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

I've added the following example as well as a "See Also" link to
ftp_raw() which acts the way your reproduce code was expecting
ftp_site() to act.


<?php
/* Connect to FTP server */
$conn = ftp_connect('ftp.example.com');
if (!$conn) die('Unable to connect to ftp.example.com');

/* Login as "user" with password "pass" */
if (!ftp_login($conn, 'user', 'pass')) die('Error logging into
ftp.example.com');

/* Issue: "SITE CHMOD 0600 /home/user/privatefile" command to ftp
server */
if (ftp_site($conn, 'CHMOD 0600 /home/user/privatefile')) {
   echo "Command executed successfully.\n";
} else {
   die('Command failed.');
}
?>



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

[2003-08-12 15:38:28] gilem at wsg dot net

Description:
------------
http://us4.php.net/manual/en/function.ftp-site.php

the docs do not specify that the SITE command is not supposed to be
included in the second argument.

This could be qualified with an example.

ftp_site( $conn_id, "CHMOD 755 filename" );



Reproduce code:
---------------
ftp_site( $conn_id, "SITE CHMOD 755 filename" );

fails since it sends 
SITE SITE...
to the server.




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


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


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to