Welcome! Log In Create A New Profile

Advanced

Specifying php.ini location

Posted by Matic 
Matic
Specifying php.ini location
August 03, 2009 09:21AM
Hi,

I've been having lots of trouble with nginx + spawnfcgi script because
I'm using FirePHP for debugging which outputs tons of messages (via
headers). It works fine without the debugging output.

Anyway, I've decided to use php-fpm and got it running on PHP 5.3.0,
but I can't see an option to supply the path of php.ini, like I could
with spawnfcgi. Therefore, the PHP is running without the config file
with default settings, which make my application completely broken (no
extensions).

How can I specify which php.ini to use?

Thank you,
Matic
Re: Specifying php.ini location
August 03, 2009 09:36AM
> How can I specify which php.ini to use?

I'm pretty sure the "-c" flag should do the trick:
/path/to/php-cgi --fpm -c /path/to/custom/php.ini

Antonio
Matic
Re: Specifying php.ini location
August 03, 2009 09:36AM
Ok,

This can be fixed by eding the php-fpm script.

Set a variable at the top of the file, after php_fpm_PID:
php_fpm_BIN=/opt/php/bin/php-cgi
php_fpm_CONF=/cluster/data/conf/php-fpm.conf
php_fpm_PID=/var/run/php-fpm.pid
>> php_config=/cluster/data/conf/php.ini << like this

then modify the line below so it look like this:
php_opts="--fpm-config $php_fpm_CONF -c $php_config"

This will work.

I'd like to point out that it would be a nice idea to have the option
of specifying the config file in php-fpm.conf

Happy day,
Matic

On Aug 3, 3:21
Re: Specifying php.ini location
August 03, 2009 02:32PM
> I'd like to point out that it would be a nice idea to have the option
> of specifying the config file in php-fpm.conf

already on the wishlist. i'll add it to launchpad soon.

it should be a very easy fix, something -i- might even be able to hack in :)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready