Why would ftp_connect() return false on production server if it works elsewhere for connecting to th

Posted by letseatfood on Stack Overflow See other posts from Stack Overflow or by letseatfood
Published on 2010-06-07T07:32:05Z Indexed on 2010/06/07 8:02 UTC
Read the original article Hit count: 224

Filed under:
|

I have a script that uses ftp_connect() among other FTP PHP functions for uploading a file.

ftp_connect() works when executed on my local development server for connecting to a remote FTP server. The same script, when executed on the remote server does not work for connecting to the exact same FTP server.

Could somebody please point me in the right direction?

Thanks!

Here is the code:

error_reporting(E_ERROR | E_WARNING | E_PARSE);
$server = 'ftp.someserver.com';
$ftpConn = ftp_connect($server);
if(!$ftpConn)
    echo 'failed';
else
    echo 'success';

No errors are reported.

© Stack Overflow or respective owner

Related posts about php

Related posts about ftp