Bug #971

spawn-fcgi ignores php command line arguments like "-c /var/www/userxyz/php/php.ini"

Added by Anonymous 694 days ago. Updated 55 days ago.

Status:Invalid Start:
Priority:High Due date:
Assigned to:- % Done:

0%

Category:core
Target version:-
Pending:

Resolution:

invalid

Patch available:


Description

Everthing works fine if I type ''php-cgi -c /var/www/userxyz/php/php.ini'' into the bash.
But if i use the spawn-fcgi command, lighttpd just ignores the arguments. There is already a patch for this:
http://forum.lighttpd.net/topic/446

Please add this patch to lighttpd 1.5! I need this to spawn secure forked php-fcgi child's. I want to have an extra php.ini for every user (to set the right base_dir for example)

-- ice

History

01/10/2007 05:41 PM - Anonymous

what php version?
i think this bug was fixed in recent php versions.
as workaround try:


PHPRC="var/www/userxyz/php/" spawn-fcgi ....

01/10/2007 06:49 PM - Anonymous

The patch for spawn-fcgi version 1.4.13 can found here: http://steph.rdev.info/devel/spawn_fcgi_1.4.13.diff

BR

-- steph

01/10/2007 07:09 PM - darix

the link gives 404.

can you answer the question and try the PHPRC workaround please?
i know that at least when spawning php from lighttpd the cmdline arguments were ignored until php 5.2. with 5.2 the arguments where no longer ignored when spawning a fastcgi from lighttpd.

01/10/2007 08:00 PM - Anonymous

i'm sorry, the correct link:
http://steph.rdev.info/devel/spawn-fcgi_1.4.13.diff

BR

-- steph

01/10/2007 08:24 PM - Anonymous

it might be just me ... but a php centric patch like that ... i dont think it is the correct solution

i will experiment a bit more with spawn-fcgi. the PHPRC thing will work at least.

01/10/2007 08:40 PM - Anonymous

root@host:/var/www/fastcgi/startup# php-cgi -v
PHP 5.1.6 (cgi-fcgi) (built: Nov 2 2006 12:43:56)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

PHP 5.2 is not available for Debian and Ubuntu.

the PHPRC workaround works perfect!
I just added a line ''PHPRC="var/www/fastcgi/userxyz/"'' in my startup Script (userxyz.sh in /var/www/fastcgi/startup/) and everything worked fine, thanks!

I followed the how-to at http://trac.lighttpd.net/trac/wiki/HowToSetupFastCgiIndividualPermissions

-- ice

01/27/2007 04:18 AM - Anonymous

Replying to :

... PHP 5.2 is not available for Debian and Ubuntu. ...

Luckily, PHP is not only free, but also OPEN SOURCE, if you catch the drift. No pre-compiled binary? Compile one yourself!
It IS available for Debian/Ubuntu!

01/27/2007 06:25 AM - darix

  • Status changed from New to Fixed
  • Resolution set to invalid

10/10/2008 06:53 PM - stbuehler

  • Status changed from Fixed to Invalid

Also available in: Atom PDF