Welcome! Log In Create A New Profile

Advanced

user.ini and php_value[]

Posted by Nathan 
Nathan
user.ini and php_value[]
December 17, 2010 05:50PM
I'm very pleased to see that .user.ini files are recognized by php-
fpm, unfortunately I'm not sure if they work well with defines at the
pool level, even if they are defined as php_value instead of
php_admin_value.

I'm trying to set a default include_path, but allow sub directories or
even different vhosts on the same pool change that at will without
having to edit the master config files. If I set the default in
php.ini I can override it with .user.ini files, just not with
php_value[] values.

I can still manipulate the ini settings from within an individual
script where php_value has been used.

fpm.conf:
.... snip ...
php_value[include_path]="."
.... snip ...

..user.ini
include_path="/full/path/to/project/include/dir"

index.php
<?php
set_include_path("/full/path/to/project/include"); // Only this one
works


Has anyone else attempted something like this, or run into this
problem?

I have spent some time spelunking through the source to php-fpm, and
it looks like the modifiable mode is being set correctly to
ZEND_INI_USER for php_value[] items.

Thoughts?
Troll
Re: user.ini and php_value[]
December 19, 2010 03:50PM
Unfortunately, I can't help you, but I would also be interested in an
answer for your question :)

Regards,

Troll

On 12/17/2010 11:47 PM, Nathan wrote:
> I'm very pleased to see that .user.ini files are recognized by php-
> fpm, unfortunately I'm not sure if they work well with defines at the
> pool level, even if they are defined as php_value instead of
> php_admin_value.
>
> I'm trying to set a default include_path, but allow sub directories or
> even different vhosts on the same pool change that at will without
> having to edit the master config files. If I set the default in
> php.ini I can override it with .user.ini files, just not with
> php_value[] values.
>
> I can still manipulate the ini settings from within an individual
> script where php_value has been used.
>
> fpm.conf:
> ... snip ...
> php_value[include_path]="."
> ... snip ...
>
> .user.ini
> include_path="/full/path/to/project/include/dir"
>
> index.php
> <?php
> set_include_path("/full/path/to/project/include"); // Only this one
> works
>
>
> Has anyone else attempted something like this, or run into this
> problem?
>
> I have spent some time spelunking through the source to php-fpm, and
> it looks like the modifiable mode is being set correctly to
> ZEND_INI_USER for php_value[] items.
>
> Thoughts?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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