Establishing FTP Connection to an VSFTPD Server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tamamk
Forum Commoner
Posts: 25
Joined: Sun Aug 24, 2008 3:37 am

Establishing FTP Connection to an VSFTPD Server

Post by tamamk »

As the title implies, I can not establish an FTP connection with either the below:

Code: Select all

ftp_connect($host,21);
ftp_ssl_connect($host,22);
Specifications:
Server: Ubuntu 9.04
FTP Server: VSFTPD
vsftpd.conf: Everything is enabled. (I know this is ringing a church bell, but this is an internal testing server).
PHP: OpenSSL is enabled
PHP: FTP is enabled

When I type:

Code: Select all

ftp 127.0.0.1
from the command line, I get connected instantly.

When I connect to the server from another machine using SFTP, I get a successful connection.

I have looked at the fsocketopen approach, but it is tedious! And, with the applications developed already that need further development and match the production's environment, I need to connect to this testing server through an FTP connection.

I have considered taking out vsftpd and replacing it with a less secure ftp server but it seems too intriguing, and considering our environment and the IT director, I won't be surprised if he decided to buff up the production's ftp server to vsftpd...this would then be my nightmare....

Any other easier suggestions on how to FTP to this server through PHP would be much appreciated...

Thanks,

T
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Establishing FTP Connection to an VSFTPD Server

Post by VladSun »

Take a look at your FTP server logs first :)
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply