Page 1 of 1

How do I use ftp_ssl_connect (openssl)?

Posted: Tue Jan 20, 2004 1:12 pm
by MitchJi
Hi,

PHP 4.3.3
Red Hat 9 (both systems)

I need a secure way to transfer files between two systems running Red Hat Linux 9 by running a program or script from a cron. I would like to run a PHP program from the cron that calls ftp_ssl_connect to create a secure ftp connection:
http://www.php.net/manual/en/function.f ... onnect.php
ftp_ssl_connect -- Opens an Secure SSL-FTP connection

In the code samples below "www.examplehost.com" is not the actual name, just a demonstration of the syntax.

This works:
$normal_connection = ftp_connect( "www.examplehost.com" );

This works:
$secure_connection = ftp_ssl_connect ( "localhost" );

This does not work:
$secure_connection = ftp_ssl_connect ( "www.examplehost.com" );


The only required parameter is the host name. When I make the call it times out. If I use localhost it works. Can anyone please tell me what I have to do to get a PHP ftp_ssl connection working between two Red Hat 9 systems?

In case I can't get this working suggested alternatives would be appreciated.

Thank You Very Much!

Mitch