PHP 4.0 Bug #5471: ftp_login warning message produced when it shouldn't be

From: Date: Sat, 08 Jul 2000 19:36:18 +0000
Subject: PHP 4.0 Bug #5471: ftp_login warning message produced when it shouldn't be
Groups: php.dev 
Request: Send a blank email to php-dev+get-23830@lists.php.net to get a copy of this message
From: kevfinn@epitaph.com Operating system: RedHat Linux 6.1 PHP version: 4.0 Latest CVS (08/07/2000) PHP Bug Type: Misbehaving function Bug description: ftp_login warning message produced when it shouldn't be I have the ftp functions working with my PHP 4.0.1pl2 setup but I'm running into an error message that is produced when it should not be. The problem arises with FTP logins exceed the specified simultaneous connections allowed by my server (by way of the /etc/ftpaccess file). When connecting to an FTP server that has exceeded the number of connections, ftp_connect connects, just as a command line FTP session would, but ftp_login fails (a command line FTP session would return the warning message provided by the server that the maximum number of connections has been exceeded), but the documentation states that ftp_login would return a false value upon failure. Instead it returns the error message : "Warning: ftp_login: Login incorrect. in /usr1/websites/epitaph.com/htdocs/temp/ftp.php on line 5" Had it returned a zero as specified in the documentation, then I could produce an appropriate error message, instead I do not have that ability. Here's the sample code that I was working with : <?PHP $ftp = ftp_connect ( "skunk.epitaph.com" ); if ( ftp_login ( $ftp, 'anonymous', 'test@epitaph.com' ) ) { echo "yep"; } else { echo "nope"; } ftp_quit ( $ftp ); ?> If the maximum limit of FTP users has not been met then the output of the code is : yep but if the limit has been exceeded the PHP created warning message is sent without my control. I believe the function ftp_login should produce the proper false value and nothing else. Kevin kevfinn@epitaph.com

« previous php.dev (#23830) next »