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,