Nginx can not upload image to cloudinary (hosted in AWS)

Hi,

Im new in Nginx. After read few articles, i think Nginx is faster than
apache (if i’m not mistaken)

Currently we’re developing a project in apache. But when we set up a
“user
acceptance test”, our clients complain that our site is running slow. So
we
migrate to nginx, everything seems to be ok, but when i want to upload a
file (using cloudinary), we never success. Previously when we’re in
apache,
this feature is ok.

we host our site in AWS

here are the log file…

any thoughts will be very helpful

2014/07/17 17:00:39 [error] 25448#0: *290 FastCGI sent in stderr: “PHP
message: PHP Fatal error: Uncaught exception ‘RequestCore_Exception’
with
message ‘The stream size for the streaming upload cannot be determined.’
in
/home/ubuntu/www/mysite/core/model/aws/lib/requestcore/requestcore.class.php:704
Stack trace:
#0
/home/ubuntu/www/mysite/core/model/aws/lib/requestcore/requestcore.class.php(819):
RequestCore->prep_request()
#1 /home/ubuntu/www/mysite/core/model/aws/services/s3.class.php(723):
RequestCore->send_request()
#2 /home/ubuntu/www/mysite/core/model/aws/services/s3.class.php(1230):
AmazonS3->authenticate(‘yap’, Array)
#3 /home/ubuntu/www/mysite/core/model/aws/modaws.class.php(115):
AmazonS3->create_object(‘yap’, ‘reviews/ee5309f…’, Array)
#4
/home/ubuntu/www/mysite/web_assets/includes/fineuploader/upload.php(85):
modAws->uploadSingle(‘/home/ubuntu/ww…’, ‘reviews/’)
#5 {main}
thrown in
/home/ubuntu/www/mysite/core/model/aws/lib/requestcore/requestcore.class.php
on line 704” while reading response header from upstream, client:
118.137.4.63, server: mysite.com, request: “POST
/web_assets/includes/fineuploader/upload.php?qquuid=ccb8962f-347b-4d33-8c37-865f29983981&qqtotalfilesize=6562&qqfile=not+jack+sparrow.jpg
HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “www.mysite.com”,
referrer: "

Posted at Nginx Forum:

On Thu, Jul 17, 2014 at 08:15:11AM -0400, email_ardi wrote:

Hi there,

There’s not much to do with nginx in this question.

You probably want to compare the environment that your php script is
executed in, in the apache system ($REQUEST and $SERVER are usually
interesting), and in the system that involves nginx (a php fastcgi
server
of some kind?).

2014/07/17 17:00:39 [error] 25448#0: *290 FastCGI sent in stderr: "PHP
message: PHP Fatal error: Uncaught exception ‘RequestCore_Exception’ with
message ‘The stream size for the streaming upload cannot be determined.’ in
/home/ubuntu/www/mysite/core/model/aws/lib/requestcore/requestcore.class.php:704

How does that php file try to determine the stream size?

How does that compare to things available in your apache system?

How does that compare to things missing from your non-apache system?

After you determine that, then it might be possible to configure nginx
to include the relevant missing thing.

Good luck with it,

f

Francis D. [email protected]

This error comes from PHP, not Nginx.
Also, it seems that the referred code is communicating with S3 and not
with
Cloudinary.

Posted at Nginx Forum: