[PHP] ftp_ssl_connect

2007-07-09 Thread Daniel Novotny
Hello,
 
I am running PHP 5.2.0 on a RHEL4 server with FTP and OpenSSL enabled:
 
ftp
FTP support => enabled
 
openssl
OpenSSL support => enabled
OpenSSL Version => OpenSSL 0.9.7a Feb 19 2003
 
I am aware of the issue of ftp_ssl_connect() silently failing to
ftp_connect() in my version of PHP; however, I am curious if there is a way
to tell why the initial ftp_ssl_connect() failed in the first place. I am
currently utilizing cURL in my program as a stand-in until I can get this
figured out, so I can tell you that this is truly a FTP over SSL and NOT a
SFTP (ssh) scenario. I can verify that the initial ftp_ssl_connect() failed
because the server I am connecting to has two different username/password
for secure and non-secure FTP connections. When I try and issue a
ftp_login(), I get "User secure_user cannot log in", telling me that the
function has indeed fell back to the non SSL function. I have also done TCP
dumps to back up this idea. They confirm that communication takes place on
the standard FTP port, not the 990 port. Please let me know if you need any
more additional info in order to help me get this mystery solved.


RE: [PHP] ftp_ssl_connect

2007-07-10 Thread Daniel Novotny
When I tried to connect through a telnet session I got the following
message:

Connection failed: The certificate chain was issued by an authority that is
not trusted.


-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 7:43 PM
To: Daniel Novotny
Cc: 'php-general@lists.php.net'
Subject: Re: [PHP] ftp_ssl_connect


Daniel Novotny wrote:
> Hello,
>  
> I am running PHP 5.2.0 on a RHEL4 server with FTP and OpenSSL enabled:
>  
> ftp
> FTP support => enabled
>  
> openssl
> OpenSSL support => enabled
> OpenSSL Version => OpenSSL 0.9.7a Feb 19 2003
>  
> I am aware of the issue of ftp_ssl_connect() silently failing to
> ftp_connect() in my version of PHP; however, I am curious if there is a
way
> to tell why the initial ftp_ssl_connect() failed in the first place. I am
> currently utilizing cURL in my program as a stand-in until I can get this
> figured out, so I can tell you that this is truly a FTP over SSL and NOT a
> SFTP (ssh) scenario. I can verify that the initial ftp_ssl_connect()
failed
> because the server I am connecting to has two different username/password
> for secure and non-secure FTP connections. When I try and issue a
> ftp_login(), I get "User secure_user cannot log in", telling me that the
> function has indeed fell back to the non SSL function. I have also done
TCP
> dumps to back up this idea. They confirm that communication takes place on
> the standard FTP port, not the 990 port. Please let me know if you need
any
> more additional info in order to help me get this mystery solved.

Is it a proper ssl certificate (ie purchased through thawte or some 
other site) or a dummy one that someone made up?

Can you manually telnet to the secure ftp port or does that fail? (ie 
check that the firewall isn't blocking the connection).

-- 
Postgresql & php tutorials
http://www.designmagick.com/


RE: [PHP] ftp_ssl_connect

2007-07-11 Thread Daniel Novotny
I installed the certificate on our server, but the ftp_ssl_connect still
fails?
I have verified that the certificate is valid and works.


-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 10, 2007 7:07 PM
To: Daniel Novotny
Cc: 'php-general@lists.php.net'
Subject: Re: [PHP] ftp_ssl_connect


Daniel Novotny wrote:
> When I tried to connect through a telnet session I got the following 
> message:
> 
> Connection failed: The certificate chain was issued by an authority that 
> is not trusted.

Get a proper certificate and you'll be right to go then I guess.

-- 
Postgresql & php tutorials
http://www.designmagick.com/