Skip to content
This repository was archived by the owner on Oct 11, 2018. It is now read-only.

Conversation

leopoiroux
Copy link
Contributor

By default, Mongo extension is not installed in "conf.d" with PHP 5.4.
The "mongo.ini" is only in "mods-availaible"

By default, Mongo extension is not installed in "conf.d" with PHP 5.4. 
The "mongo.ini" is only "mods-availaible"
@jippi
Copy link
Owner

jippi commented May 28, 2014

Have you tested this against master without the patch ? There should be a fix for the default config directory detection there

@leopoiroux
Copy link
Contributor Author

I tested the latest version (0.9.0).

With "PHP 5.4" all extensions are installed in "mods-available" and a symlink is made ​​in "conf.d". Only extensions in "conf.d" are loaded. It seems that "pecl install mongo" did not create this symlink :(

@leopoiroux
Copy link
Contributor Author

For information I also found that "php::dev" should be set "require" by "php::extension::mongo"

@leopoiroux
Copy link
Contributor Author

Have you tested my patch ?

@jippi
Copy link
Owner

jippi commented May 30, 2014

If this is a bug with mongo, then chances are that other pecl extensions have the same problem - I wonder if it should be solved in a more generic way.

What i've done in my own setup is to declare something like this

define php_support::ensure_module($ensure = 'present') {

  if $ensure == 'present' {
    exec { "php5enmod -s cli $name":
      creates => "/etc/php5/cli/conf.d/20-$name.ini",
      notify  => Service['supervisor']
    }

    if defined(Service['php5-fpm']) {
      exec { "php5enmod -s fpm $name":
        creates => "/etc/php5/fpm/conf.d/20-$name.ini",
        notify  => Service['php5-fpm']
      }
    }
  }

  if $ensure == 'absent' {
    exec { "php5dismod -s cli $name":
      onlyif  => "test -e '/etc/php5/cli/conf.d/20-$name.ini'",
      notify  => Service['supervisor']
    }

    if defined(Service['php5-fpm']) {
      exec { "php5dismod -s fpm $name":
        onlyif  => "test -e '/etc/php5/fpm/conf.d/20-$name.ini'",
        notify  => Service['php5-fpm']
      }
    }
  }

}

Wonder if it can be made more generic so it can solve the mongo issue, and other pecl installs

@leopoiroux
Copy link
Contributor Author

Oh yes !
php5enmod is more better than my solution.
Thks

@leopoiroux
Copy link
Contributor Author

When can you push your feature ?
This exactly what I need

@Peekmo
Copy link

Peekmo commented May 30, 2014

Hello,

I need it too for the same extension (mongo)
Thank you

@jippi
Copy link
Owner

jippi commented May 30, 2014

@leopoiroux I'm super swamped with a huge project at work, so not sure when I will have time to dig into it :(

Also I'm not sure if php5dismod and friends exist on RHEL and other platform either :)

@leopoiroux leopoiroux closed this Oct 15, 2014
@leopoiroux leopoiroux reopened this Oct 15, 2014
@schkovich
Copy link
Collaborator

None of the above is going to work case priority other than 20 is needed until bug 1273225 in php5enmod is fixed.

For example Solr extension is dependant on Json extension and has to be loaded after Json e.g. priority has to be set to 30.

@jippi
Copy link
Owner

jippi commented Apr 24, 2015

I ended up hacking a file { content => "; amazing inline stuff" } } to work around it - which is terrible but functional

@igalic
Copy link
Collaborator

igalic commented Apr 25, 2015

anyone looked at #116 recently :P

@schkovich
Copy link
Collaborator

Here is a proposal on how to tackle the problem in a bit more generic way. It's mixture of @jippi's idea given in this thread, @igalic's solution given in #116 and a workaround the hiera and php5(dis)enable incomparability problem described in bug #783246.

@schkovich schkovich closed this Apr 27, 2015
@schkovich schkovich reopened this Apr 27, 2015
@jippi
Copy link
Owner

jippi commented Apr 27, 2015

@schkovich can you PR it for review? :)

@schkovich
Copy link
Collaborator

Perhaps I might @jippi ;)

I was reluctant to open PR since it's a draft: I am not sure about naming, support for PHP < 5.4 is not there, I made a lot of commits and @igalic will ask me to rebase ;), etc. Anyway we can ditch PR anytime. :)

@schkovich
Copy link
Collaborator

This should be fixed in #162
refs #148

@jippi
Copy link
Owner

jippi commented Sep 25, 2016

is this still true for 7.x ?

@schkovich
Copy link
Collaborator

@jippi most likely yes since those two enable/disable commands are debian specific. anyway, i will check it and revert.

@jippi
Copy link
Owner

jippi commented Feb 17, 2017

seems like it's stalled :)

@jippi jippi closed this Feb 17, 2017
cegeka-jenkins pushed a commit to cegeka/puppet-php that referenced this pull request Mar 21, 2018
This reverts commit 090434d86eb7d041544fdd1278eee59334a0dea6.

This fixes jippi#74.
cegeka-jenkins pushed a commit to cegeka/puppet-php that referenced this pull request Mar 21, 2018
This reverts commit db7e5db917fa3eda274bf687ad9211135a1eafb0.

This fixes jippi#74.
cegeka-jenkins pushed a commit to cegeka/puppet-php that referenced this pull request Mar 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants