[php-maint] Bug#504053: Bug#504053: Bug#504053: also fails to pick up values in /etc/php5/conf.d

Chris Butler chrisb at debian.org
Tue Apr 28 14:28:08 UTC 2009


First off, sorry for missing the other bug report about conf.d, I found the
first bug that looked appropriate and neglected to look further down!

On Mon, Apr 27, 2009 at 09:34:50PM +0200, sean finney wrote:
> i guess in an ideal world there would be a way to invoke a php cmdline call
> for eache sapi config and just have it run <?php echo ini_get(foo); ?>, but
> unfortunately i think that the ini/conf.d is hardcoded at compile time for
> each sapi.

I had a similar thought when I came across this problem. It turns out that
you can use the '-c' option to override the default config file location:

chrisb at cob:~$ php -c /etc/php5/apache2/php.ini -r 'print ini_get("session.gc_maxlifetime")."\n";'
1440
chrisb at cob:~$ php -c /etc/php5/cli/php.ini -r 'print ini_get("session.gc_maxlifetime")."\n";'
60

(values set differently for each SAPI for testing purposes)

The downside of this would be that you end up with a dependency on
php5-cli[1], although it would be easy enough to fall back on the current
method if the cli isn't installed.

[1] popcon suggests about 50% of php5 installations currently have php5-cli
installed
-- 
Chris Butler <chrisb at debian.org>
  GnuPG Key ID: 1024D/D097A261





More information about the pkg-php-maint mailing list