Welcome! Log In Create A New Profile

Advanced

php fastcgi windows PHP_FCGI_CHILDREN

Posted by tdpaxton 
php fastcgi windows PHP_FCGI_CHILDREN
August 20, 2009 12:12PM
I'm trying to set up nginx with PHP via FastCGI on a Windows server. Currently, I have 2 nginx worker processes and 1 php-cgi process. I have a test PHP file with a sleep(5) command. If I attempt to browse to the web site from 2 different locations, 1 location takes 5 seconds to show the page, and the other takes 10 seconds. I'm assuming that if I had more than 1 child process, both would take 5 seconds. So my question is, how do I configure PHP_FCGI_CHILDREN in Windows?

I've tried starting 2 php-cgi processes manually using the same port, but that doesn't seem to work either.

Any help would be appreciated! Thanks!
Re: php fastcgi windows PHP_FCGI_CHILDREN
August 20, 2009 12:14PM
use php-fpm or spawn-fcgi

(if they work. i'm not sure if either will.) - welcome to "why would
you host a site on windows?" day :)

On Thu, Aug 20, 2009 at 9:12 AM, tdpaxton<nginx-forum@nginx.us> wrote:
>
> I'm trying to set up nginx with PHP via FastCGI on a Windows server.  Currently, I have 2 nginx worker processes and 1 php-cgi process.  I have a test PHP file with a sleep(5) command.  If I attempt to browse to the web site from 2 different locations, 1 location takes 5 seconds to show the page, and the other takes 10 seconds.  I'm assuming that if I had more than 1 child process, both would take 5 seconds.  So my question is, how do I configure PHP_FCGI_CHILDREN in Windows?
>
> I've tried starting 2 php-cgi processes manually using the same port, but that doesn't seem to work either.
>
> Any help would be appreciated!  Thanks!
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,5044,5044#msg-5044
>
>
Re: php fastcgi windows PHP_FCGI_CHILDREN
August 20, 2009 12:15PM
you could try setting a windows environment variable though. might
have to reboot before it will take global effect

or ask the PHP list - someone on there should know.

On Thu, Aug 20, 2009 at 9:12 AM, tdpaxton<nginx-forum@nginx.us> wrote:
>
> I'm trying to set up nginx with PHP via FastCGI on a Windows server.  Currently, I have 2 nginx worker processes and 1 php-cgi process.  I have a test PHP file with a sleep(5) command.  If I attempt to browse to the web site from 2 different locations, 1 location takes 5 seconds to show the page, and the other takes 10 seconds.  I'm assuming that if I had more than 1 child process, both would take 5 seconds.  So my question is, how do I configure PHP_FCGI_CHILDREN in Windows?
>
> I've tried starting 2 php-cgi processes manually using the same port, but that doesn't seem to work either.
>
> Any help would be appreciated!  Thanks!
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,5044,5044#msg-5044
>
>
Pavel Radaev
Re: php fastcgi windows PHP_FCGI_CHILDREN
August 20, 2009 02:31PM
Hello.

May be you have session set to start automatically in php.ini?

Best Regards, Pavel Radaev


On Thu, Aug 20, 2009 at 8:12 PM, tdpaxton wrote:

>
> I'm trying to set up nginx with PHP via FastCGI on a Windows server.
> Currently, I have 2 nginx worker processes and 1 php-cgi process. I have a
> test PHP file with a sleep(5) command. If I attempt to browse to the web
> site from 2 different locations, 1 location takes 5 seconds to show the
> page, and the other takes 10 seconds. I'm assuming that if I had more than
> 1 child process, both would take 5 seconds. So my question is, how do I
> configure PHP_FCGI_CHILDREN in Windows?
>
> I've tried starting 2 php-cgi processes manually using the same port, but
> that doesn't seem to work either.
>
> Any help would be appreciated! Thanks!
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?3,5044,5044#msg-5044
>
>
Re: php fastcgi windows PHP_FCGI_CHILDREN
September 12, 2009 01:17PM
tdpaxton: have you found a solution to the problem?
I have a windows installation win nginx+php and also in my case php-cgi does not spawn children. So far looks like the only solution is to compile everything in cygwin and patch with php-fpm.. :(
Re: php fastcgi windows PHP_FCGI_CHILDREN
April 28, 2011 12:55PM
I have the same problem. Even a simple code as

<?php
sleep(30);
phpinfo();
?>

If i access this from one browser it loads for 30 seconds, however, if i open another browser and access the same script it loads 30 + 30 seconds. I think it's waiting for the sleep to come out before it can access the same script.

My development setup is in Apache, and this works very well with concurrent access. My production is on an Amazon Micro Linux OS in the AWS. I successfully compiled Nginx 1.0.0 + spawn-fcgi (PHP + eAccelerator). My project is based on CodeIgniter framework. It works pretty well, except for the sleep part because once PHP sleeps, all the other connections can't seem to connect. If 3 connections are made to the same script with sleep(30) at the same time, the second one completes at 60s, and the third connection completes at 90s. Isn't sleep supposed to be per connection basis, as how it works in my Apache install.

Is this an Nginx issue or an OS issue?

I'm using this for spawn-fcgi
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u nginx -g nginx -f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 113
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready