2

I have the server running fine even after upgrade from 14.04. However, now that I need to perform a ISPConfig upgrade I found out that the PHP CLI is an older version. I've removed any other instances of PHP. phpinfo() running on Apache reports php7.0 and phpMyAdmin too. The problem is that some apps require mysqli support for PHP CLI but when I run php-v it shows up with :

php -v
PHP 5.5.7 (cli) (built: Feb 27 2017 14:34:47) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies

ISPConfig reports that mysqli is not loaded.

2 Answers2

1
sudo apt-get install php7.0-cli

if its already installed run ...

ls -al /usr/bin | grep php

you may find php is linked to /etc/alternatives

lrwxrwxrwx  1 root root          21 Jan 12  2017 php -> /etc/alternatives/php

for me /etc/alternatives points to the ver...

lrwxrwxrwx   1 root root    15 Mar 26 09:48 php -> /usr/bin/php7.1
0

You're trying to get the php7 CLI to show up in the console?

Try this solution. As well, try running these sets of commands: sudo apt update sudo apt upgrade sudo apt-get install php7.0

and then restart your server.

  • Thanks! I've done all of this and so I don't understand why the cli still shows as an much older version. cannot find the php file that gives result to it. PHP is installed and shows correctly under phpinfo using apache and even phpmyadmin shows it to be using php7. ISPconfig update is performed within the terminal and that uses the cli that is reported to not have mysqli enabled and is a much older version... really puzzled! – Joao Ferreira Jun 22 '17 at 12:50
  • I remember running into the same issue before - I think I had to change a config file. I'll come back to you with that when I reach a laptop – Robert Dewitt Jun 22 '17 at 16:14
  • Any help? Please! Still couldn't find any solution. I could purge php7 but it would require for sites to be down as it would affect apache2 and most probably would have to reconfigure everything.... and break ispconfig.... so... please someone! Thanks – Joao Ferreira Jun 29 '17 at 16:55