I-MSCP PHP 7.1 & MariaDB & Debian Strech

  • Hi everyone,


    I have a few questions about upgrading the core components of my web server, i.e. PHP 7.0 to PHP 7.1 and the replacement of MySQL with MariaDB. I have successfully completed my OS upgrade vom Debian 8.6 to Debian 9.0, I am on the sid branch for Apache 2.4.25 and the official MySQL repo. My sources.list looks like that:



    Code
    1. deb http://repo.mysql.com/apt/debian/ stretch mysql-5.7
    2. deb-src http://repo.mysql.com/apt/debian/ stretch mysql-5.7
    3. deb http://apt.izzysoft.de/ubuntu generic universe
    4. deb http://http.us.debian.org/debian sid main non-free contrib


    The next steps I want to perform is a switch to PHP7.1, not with PHPSwitcher plugin but with the os version. I've used Debian sid as well for that. First, I had removed the PHP7.0 packages (I didn't purge it in case to roll back and have my settings) and installed 7.1! The apache2 mod was enabled, as well as the FastCGI service (FPM) was active and running. But neither the backend nor the frontend of my homepafge was accessible. I got an 503 error.


    What additional steps do I have to perform to get the back- and frontend to working?


    For MariaDB I just wanted to make a dump of all MySQL databases and import it into MariaDB. Would this work?


    The most interesting question: does I-MSCP work with PHP7.1 and MariaDB? Or will it try to install MySQL and other components?



    Thanks for your help.



    Thanks,
    Sven

  • @TheRiddler1982


    We do not support Debian Sid for a good reason. Sid is extremely unstable. Packages can be broken at any time and even worse, they can disappear. I hope you did added required APT pinning to avoid a full upgrade to Sid.


    Are you aware that we are supporting PHP 7.1 already, even on Debian Jessie? There is no need to switch to Debian Sid, nor Testing to have PHP 7.1... With Serie 1.4.x, you can simply select either PHP 5.6, 7.0 or 7.1.


    The most interesting question: does I-MSCP work with PHP7.1 and MariaDB? Or will it try to install MySQL and other components?

    Yes, even with Jessie (as mentionned above). Next time, read the errata files: https://github.com/i-MSCP/imsc…4.x_errata.md#php-support


    Switch from MySQL 5.7 to MariaDB is no longer allowed through the i-MSCP installer as explained here: https://github.com/i-MSCP/imsc…x_errata.md#switch-policy


    So, for switching from one SGBD vendor to another, you must do that manually without forgetting to edit the /etc/imscp/imscp.conf file once done:

    Code
    1. SQL_SERVER: mysql_5.7SQL_PACKAGE: Servers::sqld::mysql

    should be set changed manually to something like:

    Code
    1. SQL_SERVER: mariadb_10.1
    2. SQL_PACKAGE: Servers::sqld::mariadb

    Note that here, I assume mariadb 10.1


    And of course, you must not forgot to rerun the i-MSCP installer once done.



    The next steps I want to perform is a switch to PHP7.1, not with PHPSwitcher plugin but with the os version. I've used Debian sid as well for that. First, I had removed the PHP7.0 packages (I didn't purge it in case to roll back and have my settings) and installed 7.1! The apache2 mod was enabled, as well as the FastCGI service (FPM) was active and running. But neither the backend nor the frontend of my homepafge was accessible. I got an 503 error.

    i-MSCP uses it own FPM instance, that is, a copy of the distribution PHP binary which is automatically copied by the frontEnd installer. Thus, you cannot upgrade your package like you have done without re-running the i-MSCP installer.

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

  • Hi you,


    thanks for your detailed reply.


    To make things clear: I am not using Debian sid, I am just using the sid source for PHP7.1 and Apache2.4.25. I am using pin priorities to stay on Stretch for all other packages. This is my preferences file:


    After reading the notes from 1.4, I should use the Ondřej Surý repository for PHP7.1 as main source and not Debian sid, shouldn't I?


    Where do I get the exact string I need to put into


    • SQL_SERVER: mariadb_10.1
    • SQL_PACKAGE: Servers::sqld::mariadb


    Ok, to summarize the upgrade I want to perform, I'll do the following:


    • Uninstall PHP7.1 from Debian sid and add the Ondřej Surý repository, install all required components
    • Install MariaDB (10.2 in my case as this is the latest stable release), migrate all databases
    • Change the strings in the imscp config file
    • Download the latest I-MSCP version
    • Run the perl imscp-autoinstall -dr php to switch to PHP7.1


    After that, everything should work as expected :-)


    Did I miss something?


    Thanks,
    Sven

  • Install MariaDB (10.2 in my case as this is the latest stable release), migrate all databases

    If you do that, don't forget to add the required section in the debian packages xml file, else, the installer will not be happy. I don't give you further instructions because if you do what you plan to do, you must known what you're doing.


    Uninstall PHP7.1 from Debian sid and add the Ondřej Surý repository, install all required components

    Uninstall all your current PHP packages but don't add the Ondřej Surý repository, It will be added automatically by the i-MSCP installer.

    SQL_SERVER: mariadb_10.1


    SQL_PACKAGE: Servers::sqld::mariadb

    If you add the correct section in the debian packages xml file as stated above, this will be done automatically by the installer. You'll have to do perl imscp-autoinstall -dr sql

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

  • Hi again,


    ok, in the first step I just concentrated with PHP7.1, so I have purged all PHP installations and config files (I didn't do any customizations), downloaded the latest version and started the installation with


    Code
    1. perl imscp-autoinstall -dr php


    The installer started but broke up, it even tried to install mariadb 10.1, which I did not trigger (I thought the old mysql server environment stays untouched). Also, the installer removed OpenSSL 1.1.0f and installed 1.0.2 which I used to get the latest ciphers (but kept the Apache 2.4.25 :-) ). MySQL is broken.


    Here is the error code:




    So, I guess I would need to help. I would ask you if you can make a damage report at my server (you helped me out in the past, twice, I think, your key ist still present in my ssh configs). I will definetely make a donation for your support.


    Thanks,
    Sven

  • The installer started but broke up, it even tried to install mariadb 10.1, which I did not trigger (I thought the old mysql server environment stays untouched). Also, the installer removed OpenSSL 1.1.0f and installed 1.0.2 which I used to get the latest ciphers (but kept the Apache 2.4.25 ). MySQL is broken.

    The installer knows nothing about MariaDB 10.2, hence my previous answer in which I said you would have to add the required section in the /root/imscp-1.4.3/autoinstaller/Packages/debian-stretch.xml packages xml file. I've also said: You must run the installer as follow follow imscp-autoinstall -dr sql


    BUT... after a fast check, it seem that you do not have added the required section, nor that you have run the installer as recommended...


    To be honnest, you should avoid mixing packages from various sources (Testing, Sid...) when you do not really know how to handle them. Right now, I don't see the required APT pinning to prevent a full dist-upgrade to Sid... Note also that installing latest software versions doesn't necessarly means a best stability.


    For the rest, I'm sorry but I cannot help you this evening. I'm sitting up in front of my computer since yesterday evening and I must now sleep a bit.


    Thank you for your understanding.

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

  • Hi again,


    no problem, just take any time to come to rest.


    I have added the mysql setting in the installer file from Debian 8. At least the installer went a little bit further.


    But there are still problems left:



    Code
    1. [ERROR] main::setupSetPermissions: Error while setting permissions: [FATAL] iMSCP::Config::FETCH: Accessing a non-existing parameter: HTTPD_CACHE_DIR_DEBIAN in /etc/imscp/frontend/frontend.data file from: /var/www/imscp/engine/setup/../PerlLib/Package/FrontEnd.pm (line 205) at /var/www/imscp/engine/setup/../PerlLib/iMSCP/Config.pm line 103, <$fh> line 10.
    2. [ERROR] autoinstaller::Functions::install: An error occurred while performing installation steps

    I have defined those parameters, rerun it and it went out with another error. For some reason, every time I restart the installer, the mysql modules (proftpd-mod-mysql) are uninstalled and I have to re-install them in a different session while the installer is still active. The same is with the proftpd-mod-mysql package.


    I would be more than happy, if you can have a look at it tomorrow.


    What would be the correct pinning not to go to sid with a dist-upgrade?


    Thanks,
    Sven

  • @TheRiddler1982


    Do you still need help? I can fix you problem if you want, updating to 1.4.x (pre 1.4.4 version) which add support for MariaDB 10.2

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

  • Hi again,


    sure, I'd would be more than happy. Could you also fix the wrong pinning for sid? I just took sid for OpenSSL 1.1.0, Apache 2.4.25 and previously PHP7.1 I'll drop you a private message.


    Thanks,
    Sven