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

PHP extensions loaded twice #341

Closed
ktreese opened this issue May 3, 2017 · 3 comments
Closed

PHP extensions loaded twice #341

ktreese opened this issue May 3, 2017 · 3 comments

Comments

@ktreese
Copy link

ktreese commented May 3, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 2016.2.1
  • Ruby:
  • Distribution: Red Hat 7
  • Module version: 4.0.0

How to reproduce (e.g Puppet code you use)

   class { '::php::globals':
     php_version => '5.6',
   } ->
   class { '::php':
     manage_repos => true,
     pear         => false,
     composer     => false,
     fpm          => false,
     settings     => {
       'PHP/memory_limit'        => '64M',
       'PHP/post_max_size'       => '32M',
       'PHP/upload_max_filesize' => '32M',
       'Date/date.timezone'      => 'America/Chicago'
     },
     extensions   => {
       bcmath   => { },
       mysqlnd  => { },
       gd       => { },
       mbstring => { },
     }
   }

What are you seeing

vgtwordpress02 ~ # php -v
PHP Warning:  Module 'bcmath' already loaded in Unknown on line 0
PHP Warning:  Module 'gd' already loaded in Unknown on line 0
PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
PHP Warning:  Module 'mysqlnd' already loaded in Unknown on line 0
PHP 5.6.30 (cli) (built: Jan 19 2017 07:57:06) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
vgtwordpress02 ~ # cd /etc/php.d/
vgtwordpress02 php.d # ls -lrth
total 112K
-rw-r--r-- 1 root root 61 Jan 19 01:00 30-pdo_sqlite.ini
-rw-r--r-- 1 root root 59 Jan 19 01:00 30-pdo_mysql.ini
-rw-r--r-- 1 root root 51 Jan 19 01:00 30-mysql.ini
-rw-r--r-- 1 root root 53 Jan 19 01:00 30-mysqli.ini
-rw-r--r-- 1 root root 59 Jan 19 01:00 20-tokenizer.ini
-rw-r--r-- 1 root root 55 Jan 19 01:00 20-sqlite3.ini
-rw-r--r-- 1 root root 55 Jan 19 01:00 20-sockets.ini
-rw-r--r-- 1 root root 49 Jan 19 01:00 20-phar.ini
-rw-r--r-- 1 root root 47 Jan 19 01:00 20-pdo.ini
-rw-r--r-- 1 root root 55 Jan 19 01:00 20-mysqlnd.ini
-rw-r--r-- 1 root root 57 Jan 19 01:00 20-mbstring.ini
-rw-r--r-- 1 root root 51 Jan 19 01:00 20-iconv.ini
-rw-r--r-- 1 root root 55 Jan 19 01:00 20-gettext.ini
-rw-r--r-- 1 root root 45 Jan 19 01:00 20-gd.ini
-rw-r--r-- 1 root root 47 Jan 19 01:00 20-ftp.ini
-rw-r--r-- 1 root root 57 Jan 19 01:00 20-fileinfo.ini
-rw-r--r-- 1 root root 49 Jan 19 01:00 20-exif.ini
-rw-r--r-- 1 root root 49 Jan 19 01:00 20-curl.ini
-rw-r--r-- 1 root root 51 Jan 19 01:00 20-ctype.ini
-rw-r--r-- 1 root root 57 Jan 19 01:00 20-calendar.ini
-rw-r--r-- 1 root root 47 Jan 19 01:00 20-bz2.ini
-rw-r--r-- 1 root root 53 Jan 19 01:00 20-bcmath.ini
-rw-r--r-- 1 root root 51 Jan 20 01:29 40-json.ini
-rw-r--r-- 1 root root 47 Apr  4 23:44 40-zip.ini
-rw-r--r-- 1 root root 22 May  3 10:48 bcmath.ini
-rw-r--r-- 1 root root 23 May  3 10:48 mysqlnd.ini
-rw-r--r-- 1 root root 18 May  3 10:48 gd.ini
-rw-r--r-- 1 root root 24 May  3 10:48 mbstring.ini

What behaviour did you expect instead

No PHP Warnings

Installation of the bcmath, mysqlnd, gd, and mbstring php packages alone already include the extension, but the php module is also creating .ini's for each.

Output log

vgtwordpress02 ~ # cat /var/log/httpd/error_log | grep "PHP Warning"
PHP Warning:  Module 'bcmath' already loaded in Unknown on line 0
PHP Warning:  Module 'gd' already loaded in Unknown on line 0
PHP Warning:  Module 'mbstring' already loaded in Unknown on line 0
PHP Warning:  Module 'mysqlnd' already loaded in Unknown on line 0

Any additional information you'd like to impart

@poikilotherm
Copy link

I think this duplicates #272 and relates to #333.

@ktreese
Copy link
Author

ktreese commented May 22, 2017

@poikilotherm indeed it is. Thank you!

@SimonHoenscheid
Copy link
Member

This was fixed in #333 and can be closed

@c33s c33s closed this as completed May 8, 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

No branches or pull requests

4 participants