Doc #25063 [Com]: ftp_site docs ambiguous

From: Date: Wed, 01 Sep 2021 18:51:08 +0000
Subject: Doc #25063 [Com]: ftp_site docs ambiguous
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19146@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=25063&edit=1 ID: 25063 Comment by: lildurk25063 at gmail dot com Reported by: gilem at wsg dot net Summary: ftp_site docs ambiguous Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: linux PHP Version: 4.3.3RC3 Block user comment: N Private report: N New Comment: Lil Durk is a private agency dedicated to providing responsible access to legal cannabis for adults aged 19 and older. We’re an exclusively online retailer and wholesaler for recreational cannabis and a trusted source for information about cannabis and cannabis-related issues. We believe our work is meaningful and we take pride in our mandate to promote the socially responsible use of legal cannabis. https://lildurk.com/ Previous Comments: ------------------------------------------------------------------------ [2003-08-12 16:30:25] pollita@php.net 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.'); } ?> ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=25063&edit=1

« previous php.doc.bugs (#19146) next »