Phpswitcher doesn't work anymore after several Updates

  • Hello everybody,


    we have Ubuntu, that has been updated to Xenial lately. IMSCP is also latest now (1.3.5) and all Plugins have been updated aswell. (Phpswitcher 2.2.12 - others are: InstantSSH, LetsEncrypt)
    We installed the PHP-Versions and the Plugin a few months ago and everything worked fine. Now, after the Update to Xenial and several Updates of IMSCP, we recognized that the PHPSwitcher does not work anymore.


    "Not work" means in this case, that the PHP-Standard (7.0.8) works fine. When choosing another PHP-Version for a Domain and viewing the PHPINFO afterwards, I receive the IMSCP 404 Message in the Popup, that should show the phpinfo. Executing a .php-file on the docroot results in a white page.


    With the standard-php-Version everything seems to be fine. Unfortunatelly this server is internal, and I can hardly grant access to the machine. (Would need to establish a route through the routers and firewalls - I hope we can figure it out without access to the machine.)


    Has anybody got any hint so far?


    Best regards,


    Pinky


    Edit: View the the Logs in /var/log/phpswitcher shows no errors for the different versions.
    [05-Oct-2016 10:05:33] NOTICE: configuration file /opt/phpswitcher/php5.3/etc/php-fpm.conf test is successful


    Everything seems to be fine with php ifself.

  • Have you recompiled the php-Versions after upgrade?

  • Yes, I executed the php-installation completely for all php-versions as described in the documentation:


    perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl --parallel-jobs 1 7.0(for all versions) I also checked the path from the configuration - the folder /opt/phpswitcher is filled with the files needed and everything seems to have worked fine.Best regards,Pinky

  • 7.0(for all versions)

    7.0 for all versions? Also have you then readded the php-Versions in admin panel? I'm sure the init-scripts also need to be updated :D

  • Good point. I'll remove them and re-add them again.


    Edit: Deleted, readded => Works. Thanks alot!
    Edit-Edit: Oh, can't close here. Would you mind?


    Best regards,
    Pinky

  • @pinky


    In the doc directory that is inside the plugin archive, there is a document graceful_update.md. You should read it.


    PhpSwitcher - Graceful update


    Generally, when a new PhpSwitcher plugin version is released, this involves the recompilation of your PHP versions to profit of latest upstream PHP versions. If you install your new PHP versions over those which are already installed, this can lead to serious problems.


    Below, we explain you how to update your PHP versions gracefully:

    • Update the plugin as usually but skip the recompilation step (see the README file)
    • Recompile your PHP versions as follow (example for PHP 5.3, 5.4, 5.5, 5.6 and 7.0):
    Code
    1. # perl /var/www/imscp/gui/plugins/PhpSwitcher/PhpCompiler/php_compiler.pl -i /opt/phpswitcher/$(date +'%Y%m%d') 5.3 5.4 5.5 5.6
    • Recompile your PHP/Pecl extensions if any for these new PHP versions (See the README.md file for more info)

    Then, assuming that we are on January 8 2016, the new PHP versions will be installed into the following directories:


    Code
    1. /opt/phpswitcher/20160108/php5.3
    2. /opt/phpswitcher/20160108/php5.4
    3. /opt/phpswitcher/20160108/php5.5
    4. /opt/phpswitcher/20160108/php5.6
    5. /opt/phpswitcher/20160108/php7.0
    • Disable your PHP versions through the PhpSwitcher administration interface
    • Edit your PHP version settings through the PhpSwitcher administration interface for updating paths
    • Reactivate your PHP versions through the PhpSwitcher administration interface
    • Remove your old PHP versions from your file system

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206