PHP 7

Discussion in 'Installation/Configuration' started by grungy, Jan 22, 2016.

  1. grungy

    grungy Member

    What are your experiences with ISPConfig 3.0.5.4 Patch 8 and PHP7? I had problems with running update.php I get this error


    Code:
    PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; db has a deprecated constructor in /tmp/ispconfig3_install/install/lib/mysql.lib.php on line 31
    PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /tmp/ispconfig3_install/install/update.php:227
    Stack trace:
    #0 {main}
      thrown in /tmp/ispconfig3_install/install/update.php on line 227
    
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig supports php 7 for websites but you can not use php7 as system php yet (see perfect server guides for required PHP versions). PHP 7 as system php is not used by any of the supported Linux Distributions yet, so there is no need for ISPConfig to support it as the standard packages of the distributions rely on the php versin of the OS as well. We will support PHP 7 as system PHP with ISPConfig 3.1 when the first distributions start to ship it as their main php version.
     
  3. grungy

    grungy Member

    Thanks till. I upgraded PHP using https://www.dotdeb.org/ repo so I have PHP 7 on my Jessie. ISPConfig does work on PHP7 but I guess not everything. I recommend we stick with PHP 5.6
     
  4. ITFixt

    ITFixt Member HowtoForge Supporter

    Hi Till

    I think I may have run up against the same problem outlined above but I've just noticed that we're now two years down the line... so I suspect ISPConfig now installs and runs with PHP7.

    However... To cut a very long and sad story short: I have upgraded my server from Ubuntu 12'04 to 14.04... and then (don't ask!) immediately to 16.04, without even a reboot in between. So, I expected the worst -a completely stuffed server which I would need to rebuild. However, once I got the network working again (ETH0 changed to something else :/) a large part of the system just worked - MySQL 5.7, Pure-FTPd, Postfix, Dovecot, etc. So, my users got their email back, which was the really important thing.

    Apache 2.4, however, is still not working. I checked & saw it was still running with the 2.2 configuration file. It was running but not serving anything... except the ISPConfig login page. If I tried to login, the request was sent but all that happened was a return to the login page with the fields emptied.

    Sso I changed the Apache2 config file for the 2.4 package's default file. I downloaded and ran the installer for ISPConfig 3.1.11 and let it reconfigure services. Now, all my sites are showing in Webmin's VHost list... and it even serves one or two of them, corrupt. I suspect this is a PHP5/7 issue.

    Logging in to ISPConfig is still the same, however - and I cannot find anything in any log file I know about that gives me a clue.

    Lastly, the system is still running on the 3.14 kernel, not the 4.x one it should be - seems that Grub-Update still defaults to it. I guess I should fix that and reboot but I'm loathe to do that ATM unless essential.

    Also, three packages did not install correctly:
    libapache2-mod-perl2
    libapache2-mod-python
    libapache2-reload-perl
    It is, of course, possible that there are multiple other problems hiding in the woodwork and the only sensible medium term solution is to move all services to another server and rebuild this one... but that's at least a week's work that I'd rather avoid :}

    Any ideas?
     
  5. Jesse Norell

    Jesse Norell Well-Known Member

    Make sure you go through https://www.howtoforge.com/tutorial...l-pureftpd-bind-postfix-doveot-and-ispconfig/ and install all required packages.

    For the ISPConfig login issue, try clearing your browser cache and cookies.

    What do you mean by serving some of your sites 'corrupt'? Check their .htaccess files for any Apache 2.2 syntax, and also their custom Apache directives once you can get logged in to ISPConfig. Then go to tools > resync and have it resync all website configs.
     
    ITFixt and ahrasis like this.
  6. ITFixt

    ITFixt Member HowtoForge Supporter

    It's a bit late for that - ISPConfig was installed over a year ago and was working fine before the OS update :)
    I have to admit that, much to my surprise, clearing the cookies worked. On reflection, I really should have thought of that myself :/ Still, that's why forums like this are so useful.

    Some sites are being served with, I suspect, some files - PERL or PHP - not being processed, some sites not at all. I assumed that, as Apache was not running in backward-compatibility mode, .htaccess files would throw up a 500 server error if it was a 2.2/2.4 syntax problem. I was not able to do the resync before as I couldn't get into ISPConfig. Now I can... I'll report back her on progress tomorrow.

    Thanks Jesse :)
     
  7. Jesse Norell

    Jesse Norell Well-Known Member

    but there are changes in some package names (though package settings will normally fix this), and at times between what packages are required/available between different os versions - I would run through and cut/paste the relevant apt-get commands just to make sure nothing is missing. You may not be, but it doesn't hurt to make sure.
     
    ITFixt and ahrasis like this.
  8. ITFixt

    ITFixt Member HowtoForge Supporter

    Thanks again Jesse.

    The package changes - that makes sense I'll give it a go & see what happens.

    Oddly, all the web sites came back this morning before I'd done a resync!! I suspect it was logging into ISPConfig successfully that triggered something (there were jobs to run in the monitor but I wasn't quick enough to see what they were).

    I ran the resync anyway and most things seem to be behaving well. All the blogs updated as soon as they were visited, unsurprisingly, which kept the system busy for a few minutes.

    I have had to temporarily disable the ISPConfig CRON job that runs 1/minute as it cannot detect that Apache is running and keeps trying to restart it, so it fills up the log and sends me two email messages every minute :/ I'd forgotten - I've had this problem for ages, before the upgrade: I used to just run the CRON job after making changes in ISPConfig. However, I think it's time to fix this one properly.

    Although PHP5 was replaced by PHP7 as part of the upgrade, the PHP settings in ISPConfig still show things such as:

    Apache php.ini path: /etc/php5/apache2/php.ini
    PHP-FPM init script: php5-fpm

    It seems that I have both PHP5 and PHP7 installed and I suspect that, given it was not done in an orderly fashion, this may be an undesirable configuration!
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to change the paths in ISPConfig to match the new paths of your system. ISPConfig does not 'know' that you made a system upgrade that changed paths and ISPConfgi will not alter any such paths after initial install to not override custom changes that an admin might have made.
     
    ahrasis likes this.

Share This Page