Installing PHP 7.1 results in an error 500 and not being able to login

Discussion in 'ISPConfig 3 Priority Support' started by axxies, Aug 10, 2017.

  1. axxies

    axxies Member

    Last edited: Aug 10, 2017
  2. axxies

    axxies Member

    I followed this guide:
    https://www.faqforge.com/linux/debugging-ispconfig-3-server-actions-in-case-of-a-failure/

    and got this:

    root@bs01 /tmp # /usr/local/ispconfig/server/server.sh
    10.08.2017-21:58 - WARNING - There is already a lockfile set, but no process running with this pid (4067). Continuing.
    PHP Fatal error: Class 'mysqli' not found in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 30


    Is it likely that an installation of PHP 7.1 has caused this or is this perhaps not the reason why my instance fails when I try to login?
     
  3. axxies

    axxies Member

    Running this solved the above problem:

    apt-get install php-mysql


    ...instead I got a new problem:

    PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:447

    But here I saw "mb_detect" so it seemed to be related to mbstring (not sure though), so I created a phpinfo.php file to check the config. After doing that I saw that mbstring was not enabled.

    apt-get install php-mbstring

    Now I seem to miss ionCube, at least ISPconfig shows an error message for that.
    Unfortunately after installing ionCube ISPconfig started to behave strangely, for instance I was not able to list the defined websites.

    I went back to the installation page:
    https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/

    and found this from

    <snip>

    From: gOOvER at: 2017-07-16 07:37:51

    Reply

    Update: On Debian 9 i must reinstall a lot of packages:


    apt-get install php-zip php-zeroc-ice php-xml php-tcpdf php-ssh2 php-soap php-snmp php-redis php-php-gettext php-mysql php-pear php-net-smtp php-net-socket php-net-imap php-net-nntp php-mcrypt php-mbstring php-imap php-intl php-json php-imagick php-gnupg php-gd php-geoip php-fpm php-dev php-mail php-mail-mime php-curl php-cli php-cgi php-bz2 php-bcmath php-apcu php-auth-sasl php-apcu-bc php7.1-common php7.0-common php5.6-common php7.1-opcache php7.0-opcache php5.6-opcache php7.1-mysql php7.0-mysql php5.6-mysql

    </snip>

    ...which seem to have solved the remaining problems (and actually also the mbstring issue). Now I will verify it.

    I am a little uncertain on whether I should do this which is mentioned after the above installation:

    NOTICE: To enable PHP 7.1 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.1-fpm


    Should I, or do ISPconfig handle this?
     
    Last edited: Aug 10, 2017
  4. axxies

    axxies Member

    and what worked yesterday doesn't today. Very strange indeed.
    Is UFW blocking http traffic too?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Do not run these commands.

    Just a guess, you might have replaced PHP 7.0 with 7.1 as system PHP which will break ISPConfig. You can use PHP 7.1 for websites in ISPConfig, but the system PHP has to remain at 7.0- Run the command:

    php --version

    the result must be php 7.0, if it is 7.1, then you have to switch the default PHP version back to 7.0.

    UFW can block any port you want. Use the ufw status commands to find out which ports are opened and closed on your server.
     
  6. axxies

    axxies Member

    Oh sorry, I meant fail2ban, does that ban accesses on http too?


    [EDIT: I guess not, there was a file that was edited during installation... *.local (?) ]
     
    Last edited: Aug 11, 2017
  7. axxies

    axxies Member

    Good. I kind of guessed that I shouldn't.

    Yes, I found one of your posts about that and yes it's swapped (but strangely enough it's working with PHP 7.1)
    Swapping the default one is that done by changing the links in /etc/alternatives or do I need to do something more?
    Is 7.0 good for ISPconfig or does it need to be 5.6 ?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Most things will work with 7.1 but not all.

    That should be enough.

    PHP 7.0 is fine.
     

Share This Page