example42 / puppet-php

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

Enabling a custom php module on ubuntu 14.04 #105

Open meecect opened 8 years ago

meecect commented 8 years ago

I have compiled a custom php module on ubuntu and am having trouble getting it to be enabled instead of just installed.

The module package includes the file /etc/php5/mods-available/${name}.ini , and puppet is able to find the right package to install from the repo at php5-${name}, but I do not automatically get a link in /etc/php5/apache/conf.d so that the module will be enabled.

I was wondering if this behavior is expected? I looked at a few other php modules apt packages and it looks like they do typically have the ${name}.ini included in the package. I assume the typical manual way of doing this is to issue a php5enmod on ubuntu.

It appears that the rest of the php modules i have installed via puppet do get a symlink in the relevant conf.d directory. Is that because their postist script is doing the equivalent of php5enmod, or am I missing some puppet option?

meecect commented 8 years ago

some more info...

I exploded some deb packages for some common php5 modules on ubuntu, and indeed, the 3 I looked at so far all had almost identical postinst scripts to enable said module(s). So, it looks like I may just need to add a postinst script to my custom package.

If anyone can confirm this direction, that would be great.

alvagante commented 8 years ago

Yes, I'd follow the patterns used in other packages, the php::module define just installs the package and does not creates links to enabled them