# Spawning PHP as FastCGI

**URL:** <https://www.ruby-forum.com/t/spawning-php-as-fastcgi/214134>\
**Category:** NGINX\
**Created:** [November 22, 2011, 9:25pm UTC](https://www.ruby-forum.com/t/spawning-php-as-fastcgi/214134 "2011-11-22T21:25:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [November 22, 2011, 9:25pm UTC](https://www.ruby-forum.com/t/spawning-php-as-fastcgi/214134/1 "2011-11-22T21:25:36Z")

</div>

I used the bash script given on this  
page[http://wiki.nginx.org/PHPFcgiExample#Spawning\_a\_FastCGI\_Process](http://wiki.nginx.org/PHPFcgiExample#Spawning_a_FastCGI_Process),  
after having changed the binding to a UNIX socket (and not a network  
one).

The update-rc configuration tool gives me this output:  
update-rc.d: using dependency based boot sequencing  
insserv: warning: script ‘php-cgi’ missing LSB tags and overrides  
insserv: There is a loop between service nginx and php-cgi if stopped  
insserv: loop involving service php-cgi at depth 2  
insserv: loop involving service nginx at depth 1  
insserv: Stopping php-cgi depends on nginx and therefore on system  
facility  
`$all’ which can not be true!  
insserv: exiting now without changing boot order!  
update-rc.d: error: insserv rejected the script header

I’m not used to the services configuration, but dependencies between  
nginx  
and php seems to be somehow buggy.  
How to fix that in a cleaner way?

## Many thanks,

_B. R._

---

<div class="post-metadata">

**Author:** ![B.R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/3be4f8/32.png) [@B.R](https://www.ruby-forum.com/u/B.R)\
**Post date:** [November 22, 2011, 9:40pm UTC](https://www.ruby-forum.com/t/spawning-php-as-fastcgi/214134/2 "2011-11-22T21:40:25Z")

</div>

On Wednesday 23 November 2011 00:24:03 B.R. wrote:

> I used the bash script given on this  
> page[http://wiki.nginx.org/PHPFcgiExample#Spawning\_a\_FastCGI\_Process](http://wiki.nginx.org/PHPFcgiExample#Spawning_a_FastCGI_Process),  
> after having changed the binding to a UNIX socket (and not a network one).  
> […]

Sorry for offtopic, but is there any reason to use it instead of  
php-fpm?

wbr, Valentin V. Bartenev
