forumone / web-starter

Starting place for developing Drupal, Wordpress and other web applications
http://forumone.github.io/web-starter/
22 stars 11 forks source link

PHP-FPM is not restarted when new PHP modules are added #247

Closed wwhurley closed 8 years ago

wwhurley commented 8 years ago

When adding new PHP modules and provisioning the following changes were made by Salt:

----------
          ID: php_install_php
    Function: pkg.installed
        Name: php
      Result: True
     Comment: 8 targeted packages were installed/updated.
              The following packages were already installed: php56u-common, php56u-xml, php56u-cli, php56u-mbstring, php56u-process, php56u-bcmath
     Started: 15:27:46.486650
    Duration: 49370.839 ms
     Changes:   
              ----------
              libXpm:
                  ----------
                  new:
                      3.5.10-2.el6
                  old:
              libmcrypt:
                  ----------
                  new:
                      2.5.8-9.el6
                  old:
              libmemcached10:
                  ----------
                  new:
                      1.0.16-1.ius.centos6
                  old:
              libtool-ltdl:
                  ----------
                  new:
                      2.2.6-15.5.el6
                  old:
              libvpx:
                  ----------
                  new:
                      1.3.0-5.el6_5
                  old:
              php56u-gd:
                  ----------
                  new:
                      5.6.24-2.ius.centos6
                  old:
              php56u-mcrypt:
                  ----------
                  new:
                      5.6.24-2.ius.centos6
                  old:
              php56u-mysqlnd:
                  ----------
                  new:
                      5.6.24-2.ius.centos6
                  old:
              php56u-opcache:
                  ----------
                  new:
                      5.6.24-2.ius.centos6
                  old:
              php56u-pdo:
                  ----------
                  new:
                      5.6.24-2.ius.centos6
                  old:
              php56u-pecl-igbinary:
                  ----------
                  new:
                      1.2.1-6.ius.centos6
                  old:
              php56u-pecl-memcached:
                  ----------
                  new:
                      2.2.0-6.ius.centos6
                  old:
              php56u-pecl-xdebug:
                  ----------
                  new:
                      2.4.1-1.ius.centos6
                  old:
              php56u-soap:
                  ----------
                  new:
                      5.6.24-2.ius.centos6
                  old:
              t1lib:
                  ----------
                  new:
                      5.1.2-6.el6_2.1
                  old:

However PHP-FPM was not restarted which lead to the following error:

[24-Aug-2016 15:01:58] NOTICE: fpm is running, pid 8955
[24-Aug-2016 15:01:58] NOTICE: ready to handle connections
[24-Aug-2016 15:35:13] WARNING: [pool vagrant] child 8957 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Class 'PDO' not found in /vagrant/public/core/lib/Drupal/Core/Database/Dr
mshade commented 8 years ago

I have a potential fix in branch of php-formula called 247-restart-fpm. Will test

mshade commented 8 years ago

Tested fix seems to work great with a vagrant provision:

----------
          ID: php_install_php
    Function: pkg.installed
        Name: php
      Result: True
     Comment: The following packages were installed/updated: php56u-bcmath
              The following packages were already installed: php56u-mcrypt, php56u-soap, php56u-common, php56u-pecl-xdebug, php56u-xml, php56u-cli, php56u-mbstring, php56u-gd, php56u-process, php56u-mysqlnd, php56u-pecl-memcached, php56u-opcache, php56u-pdo
     Started: 16:45:32.347649
    Duration: 9709.865 ms
     Changes:   
              ----------
              php56u-bcmath:
                  ----------
                  new:
                      5.6.25-1.ius.centos6
                  old:
----------
          ID: php_fpm_service
    Function: service.running
        Name: php-fpm
      Result: True
     Comment: Service reloaded
     Started: 16:45:42.298785
    Duration: 48.878 ms
     Changes:   
              ----------
              php-fpm:
                  True
mshade commented 8 years ago

Fix merged into 1.0.x branch of php-formula.