Can't build data connection: Connection refused.

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
niranjnn01
Forum Newbie
Posts: 2
Joined: Tue Jun 03, 2008 11:57 am

Can't build data connection: Connection refused.

Post by niranjnn01 »

Hello,

While trying to upload a file to the server, I am receiving the following error.

"Can't build data connection: Connection refused."

- I had used ftp_put() function, and a file is being created in the server, in the specified path, but with size=0

How can i solve this problem.?

Thank you
Rakesh
niranjnn01
Forum Newbie
Posts: 2
Joined: Tue Jun 03, 2008 11:57 am

Re: Can't build data connection: Connection refused.

Post by niranjnn01 »

Hello,
I have found the answer..
we need to use the ftp_pasv() function to set the ftp passive mode ON after logining into ftp

Rakesh
Post Reply