Two linux servers are configured with ftp for image uploading.

Source: Internet
Author: User
Tags php website website server
Two linux servers are configured with ftp for image uploading. ftp linux image uploading

Now I have two servers. one is the php website server for uploading images, and the other is a server similar to the image server. the vsftp server can be connected to obtain the directory by using ftp software, both are configured. only the built-in functions $ this-> conn_id = ftp_connect ($ FTP_HOST, $ FTP_PORT) or die ("FTP server connection failed") in php are used ");
Ftp_login ($ this-> conn_id, $ FTP_USER, $ FTP_PASS) or die ("FTP server login failed ");
Ftp_pasv ($ this-> conn_id, 1); // enable passive simulation
But the aisle ftp_connect (); stops. if you don't leave the aisle, no error will be reported and the server cannot be connected. Can the Master help solve the problem? urgently !!!!!
I don't know why Port 21 is enabled.


Reply to discussion (solution)

In non-windows environments, ftp support is not loaded by default in php.
You need to add the ftp option when compiling php.

Make sure ftp extension is loaded

There are loads. There are loads of apche. are you talking about php or apche. How can php be loaded in advance?

Why is the size 0 when the uploaded image is connected?

I guess it's a passive and active problem... I shut down various firewalls first.

Are both turned off? do both servers need to be turned off? firewall

Both are disabled, but the size of the uploaded files is still 0.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.