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 7.2 + ubuntu 16.04 - pdo-mysql extension not installing correctly #405

Closed
jackdpeterson opened this issue Jan 12, 2018 · 3 comments
Closed

Comments

@jackdpeterson
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:
    ubuntu@ip-172-31-20-126:/usr/lib/php$ dpkg -l | grep puppet
    ii librarian-puppet 2.2.1-2 all bundler for your puppet modules
    ii puppet-agent 1.10.9-1xenial amd64 The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, hiera and mcollective.
    ii puppetlabs-release-pc1 1.1.0-2xenial all Release packages for the Puppet Labs PC1 repository
    ii ruby-puppet-forge 2.1.3-1 all Access the Puppet Forge API from Ruby
    ii ruby-semantic-puppet 0.1.1-1 all Useful tools for working with semantic versions with Puppet

  • Ruby: (ruby points to 2.3).
    ii libruby2.3:amd64 2.3.1-216.04.5 amd64 Libraries necessary to run Ruby 2.3
    ii ruby2.3 2.3.1-2
    16.04.5 amd64 Interpreter of object-oriented scripting language Ruby

  • Distribution: Ubuntu 16.04 (as of 2018-01-12)

  • Module version:
    Both 4.0.0-beta1 and puppet-php 5.1.0 are impacted.

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

Puppet:

include ::php

Hiera:

version: 5
site_reliability_engineering::user: 'ubuntu'
site_reliability_engineering::group: 'ubuntu'
php::manage_repos: true
php::globals::php_version: '7.2'
php::ensure: latest
php::fpm: true
php::phpunit: false
php::package_prefix: 'php7.2-'
php::settings:
  PHP/post_max_size: '25M'
  PHP/memory_limit: '256M'
  PHP/upload_max_filesize: '20M'
  Date/date.timezone: 'America/Los_Angeles'
  iconv/iconv.input_encoding: 'UTF-8'
  iconv/iconv.internal_encoding: 'UTF-8'
  iconv/iconv.output_encoding: 'UTF-8'
php::cli::settings:
  PHP/memory_limit: '512M'
php::extensions:
  curl:
    package_prefix: 'php7.2-'
  gd:
    package_prefix: 'php7.2-'
  intl:
    package_prefix: 'php7.2-'
  json:
    package_prefix: 'php7.2-'
  mbstring:
    package_prefix: 'php7.2-'
  mysql:
    package_prefix: 'php7.2-'
  readline:
    package_prefix: 'php7.2-'
  redis:
    package_prefix: 'php-'
  pdo:
    package_prefix: 'php7.2-'
  pdo-mysql:
    package_prefix: 'php7.2-'
  soap:
    package_prefix: 'php7.2-'
  zip:
    package_prefix: 'php7.2-'

What are you seeing

everything but php7.2-pdo-mysql are installed and configured correctly.

ubuntu@ip-172-31-20-126:/etc/php/7.2/mods-available$ ls -l
total 144
-rw-r--r-- 1 root root  74 Jan 11 22:41 calendar.ini
-rw-r--r-- 1 root root  71 Jan 11 22:41 ctype.ini
-rw-r--r-- 1 root root  68 Jan 11 22:41 curl.ini
-rw-r--r-- 1 root root  66 Jan 11 22:41 dom.ini
-rw-r--r-- 1 root root  70 Jan 11 22:41 exif.ini
-rw-r--r-- 1 root root  74 Jan 11 22:41 fileinfo.ini
-rw-r--r-- 1 root root  69 Jan 11 22:41 ftp.ini
-rw-r--r-- 1 root root  64 Jan 11 22:41 gd.ini
-rw-r--r-- 1 root root  73 Jan 11 22:41 gettext.ini
-rw-r--r-- 1 root root  71 Jan 11 22:41 iconv.ini
-rw-r--r-- 1 root root 364 Sep  7 18:41 igbinary.ini
-rw-r--r-- 1 root root  68 Jan 11 22:41 intl.ini
-rw-r--r-- 1 root root  68 Jan 11 22:41 json.ini
-rw-r--r-- 1 root root  76 Jan 11 22:41 mbstring.ini
-rw-r--r-- 1 root root  71 Jan 11 22:41 mysqli.ini
-rw-r--r-- 1 root root  72 Jan 11 22:41 mysqlnd.ini
-rw-r--r-- 1 root root  79 Jan 11 22:41 opcache.ini
-rw-r--r-- 1 root root  69 Jan 11 22:41 pdo.ini
-rw-r--r-- 1 root root  70 Jan 11 22:41 phar.ini
-rw-r--r-- 1 root root  71 Jan 11 22:41 posix.ini
-rw-r--r-- 1 root root  76 Jan 11 22:41 readline.ini
-rw-r--r-- 1 root root  19 Jan 11 18:55 redis.ini
-rw-r--r-- 1 root root  71 Jan 11 22:41 shmop.ini
-rw-r--r-- 1 root root  72 Jan 11 22:41 simplexml.ini
-rw-r--r-- 1 root root  68 Jan 11 22:41 soap.ini
-rw-r--r-- 1 root root  73 Jan 11 22:41 sockets.ini
-rw-r--r-- 1 root root  73 Jan 11 22:41 sysvmsg.ini
-rw-r--r-- 1 root root  73 Jan 11 22:41 sysvsem.ini
-rw-r--r-- 1 root root  73 Jan 11 22:41 sysvshm.ini
-rw-r--r-- 1 root root  75 Jan 11 22:41 tokenizer.ini
-rw-r--r-- 1 root root  67 Jan 11 22:41 wddx.ini
-rw-r--r-- 1 root root  66 Jan 11 22:41 xml.ini
-rw-r--r-- 1 root root  72 Jan 11 22:41 xmlreader.ini
-rw-r--r-- 1 root root  72 Jan 11 22:41 xmlwriter.ini
-rw-r--r-- 1 root root  66 Jan 11 22:41 xsl.ini
-rw-r--r-- 1 root root  66 Jan 11 22:41 zip.ini

What behavior did you expect instead

Configuration file existing and pointing to the correct pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so)

Output log

Repeated execution continues to display:

Notice: /Stage[main]/Php/Php::Extension[mysql]/Exec[/usr/sbin/phpenmod -v 7.2 -s ALL mysql]/returns: executed successfully
Notice: /Stage[main]/Php/Php::Extension[pdo]/Package[php7.2-pdo]/ensure: created
Notice: /Stage[main]/Php/Php::Extension[pdo-mysql]/Package[php7.2-pdo-mysql]/ensure: created
Notice: /Stage[main]/Php/Php::Extension[pdo-mysql]/Exec[/usr/sbin/phpenmod -v 7.2 -s ALL pdo-mysql]/returns: executed successfully
Notice: /Stage[main]/Php::Fpm::Service/Service[php7.2-fpm]: Triggered 'refresh' from 3 events
Notice: Applied catalog in 3.27 seconds

Any additional information you'd like to impart

manually executing the phpenmod displays a warning.

WARNING: Module pdo-mysql ini file doesn't exist under /etc/php/7.2/mods-available
WARNING: Module pdo-mysql ini file doesn't exist under /etc/php/7.2/mods-available
@jackdpeterson
Copy link
Author

This was a local environment issue.

@c33s
Copy link
Member

c33s commented Mar 16, 2018

@jackdpeterson what was your exact problem? i have the same problem here only for debian & php7.1

@jackdpeterson
Copy link
Author

My issue was actually pretty weird — the librarian puppet dependency installation was installing the wrong cached library. If I recall i was referencing the other similarly named library that’s as an older version.

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

2 participants