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

Update mongo.pp#74

Closed
leopoiroux wants to merge 2 commits into
jippi:masterfrom
leopoiroux:patch-1
Closed

Update mongo.pp#74
leopoiroux wants to merge 2 commits into
jippi:masterfrom
leopoiroux:patch-1

Conversation

@leopoiroux

Copy link
Copy Markdown
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

jippi commented May 28, 2014

Copy link
Copy Markdown
Owner

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

@leopoiroux

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@leopoiroux

Copy link
Copy Markdown
Contributor Author

Have you tested my patch ?

@jippi

jippi commented May 30, 2014

Copy link
Copy Markdown
Owner

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
Copy Markdown
Contributor Author

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

@leopoiroux

Copy link
Copy Markdown
Contributor Author

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

@Peekmo

Peekmo commented May 30, 2014

Copy link
Copy Markdown

Hello,

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

@jippi

jippi commented May 30, 2014

Copy link
Copy Markdown
Owner

@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
Copy Markdown
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

jippi commented Apr 24, 2015

Copy link
Copy Markdown
Owner

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

@igalic

igalic commented Apr 25, 2015

Copy link
Copy Markdown
Collaborator

anyone looked at #116 recently :P

@schkovich

Copy link
Copy Markdown
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

jippi commented Apr 27, 2015

Copy link
Copy Markdown
Owner

@schkovich can you PR it for review? :)

@schkovich

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

This should be fixed in #162
refs #148

@jippi

jippi commented Sep 25, 2016

Copy link
Copy Markdown
Owner

is this still true for 7.x ?

@schkovich

Copy link
Copy Markdown
Collaborator

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

@jippi

jippi commented Feb 17, 2017

Copy link
Copy Markdown
Owner

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