thias / puppet-php

Puppet module to manage PHP
Other
49 stars 67 forks source link

Ubuntu does not read /etc/php.ini #76

Closed ashish1099 closed 9 years ago

ashish1099 commented 9 years ago

This seems to be awful, cause we setup the php.ini file with some custom value, it creates the file @ /etc/php.ini. but when I run php -i it does not read this file, even when running from apache and php-fpm, so how should I get my custom values to be there when I run phpinfo command ?

So far I have noticed it reads only these php.ini which are at this location.

for cli /etc/php5/cli/php.ini for apache /etc/php5/apache/php.ini for fpm /etc/php5/fpm/php.ini

PHP Version => 5.5.9-1ubuntu4.14

System => Linux wordpress 3.13.0-49-generic #81-Ubuntu SMP Tue Mar 24 19:29:48 UTC 2015 x86_64
Build Date => Oct 28 2015 01:31:23
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
Additional .ini files parsed => /etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-apcu.ini,
/etc/php5/cli/conf.d/20-curl.ini,
/etc/php5/cli/conf.d/20-gd.ini,
/etc/php5/cli/conf.d/20-intl.ini,
/etc/php5/cli/conf.d/20-json.ini,
/etc/php5/cli/conf.d/20-ldap.ini,
/etc/php5/cli/conf.d/20-memcached.ini,
/etc/php5/cli/conf.d/20-mysql.ini,
/etc/php5/cli/conf.d/20-mysqli.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
/etc/php5/cli/conf.d/20-readline.ini,
/etc/php5/cli/conf.d/20-ssh2.ini,
/etc/php5/cli/conf.d/20-xmlrpc.ini```
thias commented 9 years ago

I'm not entirely sure what your problem it... look at the examples in the README, as they show that you can do something like this, and it should work :

php::ini { '/etc/php5/cli/php.ini':
  display_errors => 'On',
  memory_limit   => '256M',
}