AlFra AlFra - 2 years ago 638
MySQL Question

Installing Opencart 1.5.x with PHP 7

It's first time using OpenCart. A strange issue appeared, when I've tried to install OpenCart version 1.5.4 on my computer. I've searched for an answer on forums, but community is not as large as WP's one.

enter image description here

I am using

Linux (Elementary OS - so Debian based), with
LAMPP installed on my machine.
PHP 7,
10.1.13-MariaDB (innodb_version 5.6.28-76.1),

I don't have any problem installing OC 2.x.x on my computer, but installing 1.5.4 provides me with this message (image). I've tried to uncomment (and then restart lampp)
(php.ini), but that doesn't help.

What I am doing wrong? Keep in mind, I need to install this version, I've already tried 2.x (it works normally)!

Answer Source

I realised that the 1.5.x branch of this system is quite old. If you take a look at the source for the installer file, it insists on the mysql extension. You could try hacking that, but my guess would be that it uses mysql_ calls throughout, and the whole product won't work.

As soon as you move to the 2.0.x tree, the number of permissible database extensions grows quite a bit. From this version, you can use any of these:

mysql, mysqli, pgsql, pdo

Note that mysql has been deprecated for quite a while, and in PHP 7 it was finally removed. You therefore are unlikely to be able to use OC 1.5 together with PHP 7.

Your possible solutions are:

  • Downgrade to latest PHP5.x
  • Upgrade OpenCart to 2.x
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download