# Php-apc and Nginx

**URL:** <https://www.ruby-forum.com/t/php-apc-and-nginx/175141>\
**Category:** NGINX\
**Created:** [September 8, 2009, 11:17pm UTC](https://www.ruby-forum.com/t/php-apc-and-nginx/175141 "2009-09-08T23:17:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Baudino](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecccb3/32.png) [@Michael\_Baudino](https://www.ruby-forum.com/u/Michael_Baudino)\
**Post date:** [September 8, 2009, 11:17pm UTC](https://www.ruby-forum.com/t/php-apc-and-nginx/175141/1 "2009-09-08T23:17:45Z")

</div>

Hello everyone,

I’m running OpenUpload 0.4.1 (a RapidShare-like web-app) on nginx-0.6.32  
with php-5.2.6 and php-apc-3.0.19 (all but openupload are from debian  
stable repositories).

Everything is working fine, except that OpenUpload is supposed to  
display progress information during upload of a file using APC.  
It does not on my config ☹

According to Alessandro Briosi, OpenUpload developer, the problem might  
come from nginx not passing some information to php.

My full thread with him is here :  
[https://sourceforge.net/tracker/?func=detail&aid=2854594&group\_id=242018&atid=1117805](https://sourceforge.net/tracker/?func=detail&aid=2854594&group_id=242018&atid=1117805)

Could anyone here confirm that it could be the source of the problem ?  
And do you have any way to fix this ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Michael\_Baudino](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecccb3/32.png) [@Michael\_Baudino](https://www.ruby-forum.com/u/Michael_Baudino)\
**Post date:** [September 8, 2009, 11:31pm UTC](https://www.ruby-forum.com/t/php-apc-and-nginx/175141/2 "2009-09-08T23:31:13Z")

</div>

> Everything is working fine, except that OpenUpload is supposed to  
> display progress information during upload of a file using APC.  
> It does not on my config ☹

Does the upload progress module have anything to do with it?

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

> According to Alessandro Briosi, OpenUpload developer, the problem might  
> come from nginx not passing some information to php.

It does so through FastCGI, have you checked your parameters?

HTH,  
Nuno MagalhÃ£es

---

<div class="post-metadata">

**Author:** ![Michael\_Baudino](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecccb3/32.png) [@Michael\_Baudino](https://www.ruby-forum.com/u/Michael_Baudino)\
**Post date:** [September 9, 2009, 12:07am UTC](https://www.ruby-forum.com/t/php-apc-and-nginx/175141/3 "2009-09-09T00:07:32Z")

</div>

Hello!

On Tue, Sep 08, 2009 at 11:11:45PM +0200, Michael Baudino wrote:

> According to Alessandro Briosi, OpenUpload developer, the problem might  
> come from nginx not passing some information to php.
> 
> My full thread with him is here :  
> [https://sourceforge.net/tracker/?func=detail&aid=2854594&group\_id=242018&atid=1117805](https://sourceforge.net/tracker/?func=detail&aid=2854594&group_id=242018&atid=1117805)
> 
> Could anyone here confirm that it could be the source of the problem ?  
> And do you have any way to fix this ?

Traditional backend-based uploaders do not work with nginx as  
nginx only passes request to backend once it got full request.

You should use nginx modules for this instead. At least one is  
listed on wiki.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Michael\_Baudino](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecccb3/32.png) [@Michael\_Baudino](https://www.ruby-forum.com/u/Michael_Baudino)\
**Post date:** [September 9, 2009, 12:08am UTC](https://www.ruby-forum.com/t/php-apc-and-nginx/175141/4 "2009-09-09T00:08:07Z")

</div>

## Michael Baudino Wrote:

> display progress information during upload of a  
> file using APC.  
> It does not on my config ☹
> 
> According to Alessandro Briosi, OpenUpload  
> developer, the problem might  
> come from nginx not passing some information to  
> php.

This is almost certainly the case.

When nginx uploads a file it uploads the entire file before passing it  
to PHP. Consequently the script has no way to know how much of the file  
has been uploaded until the upload is complete.

> My full thread with him is here :  
> [https://sourceforge.net/tracker/?func=detail&aid=2](https://sourceforge.net/tracker/?func=detail&aid=2)  
> 854594&group\_id=242018&atid=1117805
> 
> Could anyone here confirm that it could be the  
> source of the problem ?

See above

> And do you have any way to fix this ?

You can recode the app to use some third party nginx modules, but short  
of that probably not. More practical would be to show a different GIF  
than what you are showing now - one which includes a message to the user  
that their file is being uploaded and to wait until it is completed.

> Thanks in advance
> 
> –  
> Michael Baudino  
> KameHouse Prod.

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,6021,6030#msg-6030](http://forum.nginx.org/read.php?2,6021,6030#msg-6030)
