ID: 33995 User updated by: zxc at zmail dot ru Reported By: zxc at zmail dot ru Status: Bogus Bug Type: FTP related Operating System: Win2000 SP4 PHP Version: 4.4.0 New Comment:
Hi, Tony. Hi, Sniper. I has understood what was it: -- Example #1: <? $ftp=ftp_connect("remoteFtpServer.domain"); // I using not existing account to connect. var_dump(ftp_login($ftp,"unknown","user")); ?> Actual result is: bool(false) with WARNING message (WARNING: ftp_login(): Not logged in, user or password incorrect!). It's right. -- Example #2: <? $ftp=ftp_connect("remoteFtpServer.domain"); // I using not existing account to connect. var_dump(@ftp_login($ftp,"unknown","user")); ?> Actual result is: bool(false) WITHOUT WARNING message (WARNING: ftp_login(): Not logged in, user or password incorrect!), but I use a "@" before ftp_login() function. It's right. -- Example #3: <? function errHandler($errNum,$errStr,$errFile,$errLine) { } set_error_handler("errHandler"); $ftp=ftp_connect("remoteFtpServer.domain"); // I using not existing account to connect. var_dump(@ftp_login($ftp,"unknown","user")); ?> Actual result is: bool(false) WITHOUT WARNING message (WARNING: ftp_login(): Not logged in, user or password incorrect!), but I use a "@" before ftp_login() function and in errHandler() function I did not define string fot E_WARNING level. It's right. -- Example #3: <? function errHandler($errNum,$errStr,$errFile,$errLine) { switch($errNum) { case E_WARNING: echo "Warning: ...place for original WARNING message..."; break; } } set_error_handler("errHandler"); $ftp=ftp_connect("remoteFtpServer.domain"); // I using not existing account to connect. var_dump(@ftp_login($ftp,"unknown","user")); ?> Actual result is: bool(false) > WITH WARNING < message (WARNING: ftp_login(): Not logged in, user or password incorrect!) from errHandler() ftunction, but I use a "@" before ftp_login() function and in errHandler() function I did define string fot E_WARNING level. It's wrong. But I read manual strings: "It is important to remember that the standard PHP error handler is completely bypassed. error_reporting() settings will have no effect and your error handler will be called regardless - however you are still able to read the current value of error_reporting and act appropriately. Of particular note is that this value will be 0 if the statement that caused the error was prepended by the @ error-control operator." And now I think It's maybe right. Previous Comments: ------------------------------------------------------------------------ [2005-08-08 08:56:12] [EMAIL PROTECTED] This isn't getting anywhere and as neither me or Tony can reproduce this with latest CVS -> bogus. ------------------------------------------------------------------------ [2005-08-08 08:18:23] zxc at zmail dot ru sniper, how I show this WARNING again, I tell you FTP server software. I don't tell you it now because LAN has many different FTP server softwares. ------------------------------------------------------------------------ [2005-08-07 14:25:09] [EMAIL PROTECTED] Can you at least tell us WHAT ftp server software is it?! ------------------------------------------------------------------------ [2005-08-07 14:06:41] zxc at zmail dot ru Tony, it's very hard because all ftp servers are in private LAN. ------------------------------------------------------------------------ [2005-08-05 19:42:55] [EMAIL PROTECTED] What FTP server do you use? (software name, version etc.) Is it a public server? Can you give us it's IP/hostname? And probably we'll need an account there too, if it rejects anonymous logins. ------------------------------------------------------------------------ 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/33995 -- Edit this bug report at http://bugs.php.net/?id=33995&edit=1