Qiniu uploads the file server to display 502. How can this problem be solved?

Source: Internet
Author: User
The server environment is nginx + php-fpm. I used the php-sdk of qiniu to write a demo for uploading files. The local operation is normal. The following result is displayed during the upload to the server: {code ...} I found some ways to solve the nginx502 error on the Internet, but it does not seem to have taken effect. Please advise me how to solve this problem .... The server environment is nginx+ php-fpm
I wrote a file upload demo using the php-sdk of qiniu. The local operation is normal. The following results are displayed during the upload to the server:

1. Run the 'php demo. php' command on the server terminal. The result is normal and the file is uploaded successfully. 2. Access 'HTTP: // xxx.com/demo.php' in a browser. After a long time, the file fails to be uploaded due to a 502error.

I found some ways to solve the nginx 502 error on the Internet, but it does not seem to have taken effect. Please advise me how to solve this problem.

Attached demo. php code:


  UploadToken ($ bucket); // construct the UploadManager object $ uploadMgr = new UploadManager (); $ data = file_get_contents('11.jpg '); $ rt = $ uploadMgr-> upload', $ data ); print_r ($ rt );

Reply content:

The server environment isnginx+php-fpm
I wrote a file upload demo using the php-sdk of qiniu. The local operation is normal. The following results are displayed during the upload to the server:

1. Run the 'php demo. php' command on the server terminal. The result is normal and the file is uploaded successfully. 2. Access 'HTTP: // xxx.com/demo.php' in a browser. After a long time, the file fails to be uploaded due to a 502error.

I found some ways to solve the nginx 502 error on the Internet, but it does not seem to have taken effect. Please advise me how to solve this problem.

Attached demo. php code:


  UploadToken ($ bucket); // construct the UploadManager object $ uploadMgr = new UploadManager (); $ data = file_get_contents('11.jpg '); $ rt = $ uploadMgr-> upload', $ data ); print_r ($ rt );

Is this still a problem? Is your server unstable? You may need to purchase stable servers,

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.