example42 / puppet-php

A puppet module for php. According to Example42 NextGen spec.
Other
45 stars 62 forks source link

Ubuntu PHP package configuration upgrade #13

Closed lxyu closed 11 years ago

lxyu commented 11 years ago

Env:

PHP 5.4.6-1ubuntu1.1 (cli) (built: Nov 15 2012 01:18:34)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Ubuntu 12.10

The /etc/php5 structure has changed. Now with this structure:

.
├── cli
│   ├── conf.d -> ../conf.d
│   └── php.ini
├── conf.d
│   ├── 10-pdo.ini -> ../mods-available/pdo.ini
│   └── 20-apc.ini -> ../mods-available/apc.ini
├── fpm
│   ├── conf.d -> ../conf.d
│   ├── php-fpm.conf
│   ├── php.ini
│   └── pool.d
│       └── www.conf
└── mods-available
    ├── apc.ini
    └── pdo.ini

So this module is not working for the latest php package.

I have not tested other releases and so can't provide a good solution.

alvagante commented 11 years ago

Any idea of where is the php.ini when used with a web server ? (maybe you have to install more packages to get it). Wondering if it makes sense to change /(?i:Ubuntu|Debian|Mint)/ => '/etc/php5/php.ini', to /(?i:Ubuntu|Debian|Mint)/ => '/etc/php5/cli/php.ini', (for the relevant versions).

lxyu commented 11 years ago

It depends, the latest configuration structure seems separate php.ini for different packages.

I use a 'lnmp' solution, which use php5-fpm and nginx, and in this case, it's /etc/php5/fpm/php.ini. I'm not familiar with other solutions and so I don't know if it differs.

And I not sure if the older version of ubuntu has upgraded to this structure too. More tests need to be done, but I don't have that environment.

alvagante commented 11 years ago

Well, in any case you can set the path of your ini file with config_file => '/etc/php5/fpm/php.ini', so that you can manage it with the template or source parameters.

lxyu commented 11 years ago

OK, I'll try it later then.

On Monday, March 11, 2013, Alessandro Franceschi wrote:

Well, in any case you can set the path of your ini file with config_file => '/etc/php5/fpm/php.ini', so that you can manage it with the template or source parameters.

— Reply to this email directly or view it on GitHubhttps://github.com/example42/puppet-php/issues/13#issuecomment-14707361 .

Lx Yu Operation & Maintenance Director, ELEME Inc. http://ele.me

lxyu commented 11 years ago

It works, the module is really customizable, I was just knowing I can change the config file parameter.

Thanks.