vapanchamukhi1 Posted April 6, 2011 Share Posted April 6, 2011 I have written a piece of code for ftp connection. I am able to connect to ftp server. but when i try to login to the ftp server using user name and password it is giving me following error. Warning: ftp_login() [function.ftp-login]: End in .\FtpServerFileProcess.php on line 35 the code is as below, public function loginToFTP() { // login with username and password $this->login_result = ftp_login($this->conn_id, $this->ftp_user_name, $this->ftp_user_pass); ftp_pasv($this->conn_id, true); return $this->login_result; // check login /* if ((!$this->login_result)) { echo "FTP connection has failed!"; echo "Attempted to Login to $this->ftp_server for user $this->ftp_user_name"; exit; } else { echo "Loggedin into $this->ftp_server, for user $this->ftp_user_name"; } */ } where conn_id is the connection handler that i got after connecting to the ftp server. ftp_user_name is User name using which i am trying to login to the ftp server ftp_user_pass is the password using which i am trying to login to the ftp server. Please some one help to understand the meaning of the error and also the way of getting rid of that error. Quote Link to comment https://forums.phpfreaks.com/topic/232905-please-some-one-help-on-ftp_login-error/ Share on other sites More sharing options...
betterphp Posted April 8, 2011 Share Posted April 8, 2011 Are you using some kind of Microsoft FTP server, according to this http://www.net2ftp.org/forums/viewtopic.php?id=3759 that could be the problem. Quote Link to comment https://forums.phpfreaks.com/topic/232905-please-some-one-help-on-ftp_login-error/#findComment-1198777 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.