Closed choonchernlim closed 9 years ago
Are you using Puppet with future parser enabled?
Yes, I did. I also enabled future parser when running on Ubuntu, and that works just fine.
Uhm, even if it seems you have it enabled also on Ubuntu , I think the issue is related to future parser. Are you using the same Puppet version on Ubuntu and Centos? What happens on Centos if you disable the future parser?
Core reason could be that on Puppet 4 / future parser (don't know since which version) an empt string evaluates as true, while before it was evaluated as false.
Saying this without having tested that or having looked with care at the code
Thank you for the explanation. I decided not to use future parser at this moment in attempt to get this installation to work.
I currently have the following:-
class { '::php': }
php::module { "enchant": }
php::module { "ldap": }
php::module { "gd": }
php::module { "mysql": }
It seems to install fine, but the modules for some reason are not enabled. I did php -m
and I'm seeing this:-
[PHP Modules]
bz2
calendar
Core
ctype
date
ereg
exif
filter
ftp
gettext
gmp
hash
iconv
libxml
openssl
pcntl
pcre
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
zlib
[Zend Modules]
The /etc/php.ini
exists, but an empty file. There's no /etc/php.d
directory.
What did I do wrong? Thank you.
It appears to me that I have to manually add the following to /etc/php.ini
to get the modules to work:-
extension=enchant.so
extension=ldap.so
extension=gd.so
extension=mysql.so
Am I missing some puppet configurations above to have the listed modules autoloaded?
Thank you.
You are right, the php::module defines just installs the relevant package but does not ensures it's enabled at the configuration level (some packages on some OS do that, others don't...). I suppose we can add a parameter that allows option to create such files.
That's a bummer. I believe Ubuntu added them for me, but it looks like that doesn't work on RHEL 6.
A feature like that would be great.
I tried php::augeas
, it only allow me to add just one extension line.
same problem here on Centos 7, I can't really get around it, even specifying either source or template. If I try with Centos 6.5 it works (using puphpet scripts)
Core reason could be that on Puppet 4 / future parser (don't know since which version) an empt string evaluates as true, while before it was evaluated as false.
Saying this without having tested that or having looked with care at the code
This is exactly right: Puppet 3.7 future/Puppet 4 interprets empty strings as true
.
Hi folks . I have run into the same problem. "Error: PHP: cannot set both source () and template () on node X"
I am using future parser on PE 3.8. I cant switch off the future-parser as I am using 'collection.each{}' construct in a different manifest. Is there a work-around for this ? I am using centos 6.6
Just to confirm you that the parser = future
make me trouble with the source and template condition on puppet 3.8. Removing it fix it. However I cannot use anymore the each feature of puppet future
See pull request: https://github.com/example42/puppet-php/pull/96
PR #96 merged issue should be fixed
I had successful experience getting this module to work on Ubuntu, but I am having problem trying to get it to work on RHEL 6.
I tried to configure using the default:
class { 'php': }
The error I'm getting is this:-
I read
init.pp
and the error seems to be happening on this:-When I inspected these values, both are empty strings. So I decided to comment out that check and set both
$manage_file_source
and$manage_file_content
toundef
, but then I get error about$php::source_dir
being empty when trying to createphp.dir
.This is getting very frustrating. It works flawlessly on Ubuntu, but I can't cannot replicate my success on RHEL. I'm running Puppet 3.7.3 on RHEL 6, by the way.