Little help if you will....

Good afternoon…

I have an issue with FTP Upload.

My problem is this… When the script creates the ftp account it makes it with the IP address I’m having it connect too for the FTP upload. So I end up with something like “[email protected]” as the log in… However the Cpanel is creating like "[email protected]"… When the script tries to authenticate the FTP its getting an error because it’s using IP.ADDRESS and not domain.

in file i have:
[php] // authenticate
$login_result = ftp_login($conn_id, $ftpAcc[‘ftp_user’] . ‘@’ . $this->settings[‘connection_cpanel_host’], $ftpAcc[‘ftp_password’]);
if ($login_result === false)[/php]

so it’s using the ftp_username@ipaddress to connect, it fails everytime, cause cpanel created [email protected]

The domain will never change…

i need it to authenticate using [email protected]… if it keeps using connection_cpanel_host it is using the IP address and will always fail to authenticate.

Thanks for your help

Jeremy

If the domain never changes just hard code it…

Change:

[php] $login_result = ftp_login($conn_id, $ftpAcc[‘ftp_user’] . ‘@’ . $this->settings[‘connection_cpanel_host’], $ftpAcc[‘ftp_password’]);[/php]

To:

[php] $login_result = ftp_login($conn_id, $ftpAcc[‘ftp_user’] . ‘@domain.com’, $ftpAcc[‘ftp_password’]);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service