0

PHP 7.0 installed with mysql extension, loaded in both fpm and cli. But this shows while installing ISPConfig 3:

# php -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
json
libxml
mbstring
mongodb
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

/tmp/ispconfig3_install/install > root@vm18722 [php:7.0.5-system]
# php -q install.php


--------------------------------------------------------------------------------
 _____ ___________   _____              __ _         ____
|_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
  | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
  | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
 _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
 \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                              __/ |
                                             |___/
--------------------------------------------------------------------------------


>> Initial configuration

Operating System: 14.04.4 LTS (Trusty Tahr)

    Following will be a few questions for primary configuration so be careful.
    Default values are in [brackets] and can be accepted with <ENTER>.
    Tap in "quit" (without the quotes) to stop the installer.


Select language (en,de) [en]:

Installation mode (standard,expert) [standard]:

Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [vm18722]:

No PHP MySQL functions available. Please ensure that the PHP MySQL module is loaded.

/tmp/ispconfig3_install/install > root@vm18722 [php:7.0.5-system]
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
VeeeneX
  • 1,556
  • 18
  • 26
  • Mysqli and PDO are there, the old mysql_* api was deprecated in 5.something and (finally) removed in PHP 7. – JimL Apr 17 '16 at 09:35
  • @JimL That's true but this is happing on this line https://git.ispconfig.org/ispconfig/ispconfig3/blob/master/install/install.php#L191 – VeeeneX Apr 17 '16 at 09:36
  • @VeeeneX That's not your version, your error message is different. Try comparing it to the 3.0.5 branch on the top left. Long story short: You need a newer ispconfig version. `<=3.0.5` uses `mysql_*` which is no longer present in PHP7, `>=3.1` uses `mysqli_*`. – ccKep Apr 17 '16 at 09:38
  • How old a version of ISPConfig is this? The outdated `mysql` module is indeed missing (and I think unsupported on PHP 7). Modern versions of ISP config require the `mysqli` module and specifically say so in the error message. – Chris Apr 17 '16 at 09:38
  • Yup guys, thanks I pulled git repo and now it works, so that means stable version on website doesn't work for 7. – VeeeneX Apr 17 '16 at 09:41
  • The commit in question is [this one](https://git.ispconfig.org/ispconfig/ispconfig3/commit/f1926a01df8871cdacb29c97ffbfd7ff18d1610a). – ccKep Apr 17 '16 at 09:42
  • @ccKep Oh they finally updated the installer? Half a year ago they said in their bugtracker they wouldn't update the installer yet because PHP 7 isn't yet in the stable distributions packages list. Honestly a stupid excuse to be lazy. – Charlotte Dunois Apr 17 '16 at 15:11
  • @CharlotteDunois I fixed it with pulling git anyway. – VeeeneX Apr 19 '16 at 14:05

1 Answers1

1

Stable version on website doesn't work for php 7.0. So here's the fix:

git clone https://git.ispconfig.org/ispconfig/ispconfig3.git
cd ispconfig3/install
php -q install.php

As ccKep mentioned it's fixed in https://git.ispconfig.org/ispconfig/ispconfig3/commit/f1926a01df8871cdacb29c97ffbfd7ff18d1610a

VeeeneX
  • 1,556
  • 18
  • 26