Page 1 of 1

Issues since upgrading server from php 5.4 to 5.6

Posted: Tue Sep 27, 2016 4:27 pm
by fiif
A number of websites with open cart are having issues since upgrading from php 5.4 to 5.6, we are getting the below error:

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO...

I can see there was a thread on this previously : http://forum.opencart.com/viewtopic.php?f=20&t=163163 however no fix was given at that time. Does anyone have a quick run down on what will need to be done to update the install to run using 5.6 or is there an article I would be able to reference? I will be unable to give FTP logins to these accounts

Any help would be very much appreciate

Re: Issues since upgrading server from php 5.4 to 5.6

Posted: Tue Sep 27, 2016 8:52 pm
by villagedefrance
Like the error message says, MySql database is deprecated. MySqli or PDO are the answer.

Basically it looks like you need to backup all your data, do a clean install using MySqli (or PDO) and re-inject your data in your tables. There is obviously a risk of losing data ...

Re: Issues since upgrading server from php 5.4 to 5.6

Posted: Tue Sep 27, 2016 9:40 pm
by Avvici
Perhaps it is also interesting to know exactly why it shows up. The entire ext/mysql PHP extension, which provides all functions named with the prefix mysql_, was officially deprecated in PHP v5.5.0 and removed in PHP v7.