Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP Warning: Module 'newrelic' already loaded in Unknown on line 0 (Debian) #16

Merged
merged 2 commits into from
Feb 19, 2018

Conversation

jonhattan
Copy link

In Debian systems, the .deb package installs:

php5/mods-available/newrelic.ini
php5/cli/conf.d/20-newrelic.ini
php5/apache2/conf.d/20-newrelic.ini

Additionally, this module calls newrelic-install, that places:

php5/cli/conf.d/newrelic.ini
php5/apache2/conf.d/newrelic.ini

At this point there're two files per PHP SAPI declaring extension=newrelic.so

So the module tries tu purge the offending files with the purge_files artifact - https://github.com/claranet/puppet-newrelic/blob/master/manifests/agent/php.pp#L18

The params value for $purge_files are missing the cli sapi, so the problem is not fixed in full. Moreover, Debian stretch and the various php versions provided by https://deb.sury.org/ allows several php versions to coexist. At the end we want to remove all those files /etc/php/{5.6,7.0,7.1,7.2}/{apache2,cli,fpm}/conf.d/newrelic.ini.

Let's go a step back. The debian packages already put the files in place. It's not needed to run newrelic-install. This PR removes the $purge_files thing and disables the execution of newrelic-install in debian.

@rgevaert
Copy link

Is there any progress on this? I would like to see it resolved. thanks

@craigwatson
Copy link

Apologies for the delay in reviewing this - I've been away for a week.

@craigwatson craigwatson merged commit 2ccef36 into claranet:master Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants