Diemuzi
Custom php.ini
August 19, 2010 03:28PM
Quick background on what I'm using:
* Archlinux OS
* Apache 2.2.15
* PHP 5.3.3 w/FPM support enabled
* mod_fastcgi 2.4.6

Prior to using FPM I was using a CGI/FastCGI (As shown in phpinfo from
Server API). Now it shows FPM/FastCGI. It appears to be working
correctly.

My question is regarding the ability to allow customers to upload
their own custom php.ini file and have the contents used for their
VirtualHost. I've uploaded a test copy but the values are not being
read. The Loaded Configuration File does not change from /usr/local/
lib/php.ini to the file I uploaded. Under the CGI/FastCGI I was using
previously, this would instantly change once I uploaded the new
php.ini. Is there something I'm missing?

I prefer not to hardcode the values in the fpm configuration for each
pool.

It also appears if I make a change in the php.ini file which is
currently loaded it does not take effect until FPM has been restarted.
Is this how it was designed to work?

I've tried using .htaccess to set the PHPRC environment variable but
that does not seem to affect anything in this regard.

If you need my configurations I can post them to assist using pastbin.
Any help would be very helpful, thank you!
Re: Custom php.ini
August 19, 2010 03:36PM
On Thu, Aug 19, 2010 at 8:40 AM, Diemuzi <diemuzi@gmail.com> wrote:
> Quick background on what I'm using:
> * Archlinux OS
> * Apache 2.2.15
> * PHP 5.3.3 w/FPM support enabled
> * mod_fastcgi 2.4.6
>
> Prior to using FPM I was using a CGI/FastCGI (As shown in phpinfo from
> Server API). Now it shows FPM/FastCGI. It appears to be working
> correctly.
>
> My question is regarding the ability to allow customers to upload
> their own custom php.ini file and have the contents used for their
> VirtualHost. I've uploaded a test copy but the values are not being
> read. The Loaded Configuration File does not change from /usr/local/
> lib/php.ini to the file I uploaded. Under the CGI/FastCGI I was using
> previously, this would instantly change once I uploaded the new
> php.ini. Is there something I'm missing?

a) no, not instantly, even if this was a feature, you'd need to
restart (or reload, which is graceful)

b) take a look at http://pecl.php.net/package/htscanner

> It also appears if I make a change in the php.ini file which is
> currently loaded it does not take effect until FPM has been restarted.
> Is this how it was designed to work?

you need to reload or restart. although when a new child is launched
those new children -may- inherit the new php.ini values, but you don't
want them to be out of sync. just service php-fpm reload and you're
golden (and graceful)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
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