Post by Druvan » Fri Aug 11, 2017 4:38 am

Hey!
Anyone had this problem?

We are trying to update our PHP version from 5.2 to 5.6.
We are using Opencart v1.5.6.4
We are using a Windows VPS system at 32-bit.
We have not overwritten any files, we made a new folder for new version.
We are planning to upgrade our mysql too and dont know if this is an issue for php since our mysql now are at v5.1
We have not changed anything in php.ini or .htaccess

After we installed and changed folder to new php5.6 in IIS and also cleared the vqcache files we get this error:
Fatal error: Call to undefined function mysql_connect() in
\system\database\ipsmysql.php on line 10


After we changed in root and admin for config.php to mysqli we get this error:
Fatal error: Class 'mysqli' not found in \system\database\ipsmysqli.php on
line 11


Really hope someone had same problem as me.
What have I missed?

New member

Posts

Joined
Mon Aug 08, 2016 5:39 am

Post by IP_CAM » Fri Aug 11, 2017 7:05 am

did you change this in your both config.php Files ?
FROM

Code: Select all

// DB
define('DB_DRIVER', 'mysql');
TO:

Code: Select all

// DB
define('DB_DRIVER', 'mysqli');
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Druvan » Sat Aug 12, 2017 4:18 am

Hey Ernie
I did try that since I started to google "php errors for opencart"
Could it be because of the old mysql version of 5.1?
Are there any other settings in Opencart that I maybe need to change?

New member

Posts

Joined
Mon Aug 08, 2016 5:39 am

Post by IP_CAM » Sat Aug 12, 2017 10:45 am

well, I am ZERO competent, when it comes to PHP Versions, but you should better update
to at least PHP v.5.6 , since your PHP Version does possibly not yet support mysqli,
or at least not your mysqli.php file Content, since different such 1.5.x files exist, as you
can find in the OC Extension Section, for what reason ever... 8)

But since mysqli is performing much better, and absolutely best, in conjunction with
ATOMIX famous MyISAM to InnoDB - Engine Changer / DB-Full-Indexer PHP tool,
it would be a plain waste, load-performance-wise, not to 'upgrade' your PHP Version
as soon as possible anyway.

BTW. The latest v.1.5.6.5_rc can also be found here, as well as the ATOMIX Tool:
http://www.bigmax.ch/shop/index.php?rou ... ation_id=4
and if you have/use no modified OC 1.5.6.4 Source, you could, technically, just
overwrite your existing Source with the Code of a 1.5.6.5 Version, to fix FLAWS, found in
1.5.6.4, still after it's release. Everything else is still the same as in OC v.1.5.6.4.
ChangeLog 1.5.6.4 - 1.5.6.5: (it's a real pity, it would have been so easy for OC,
to at least create a security-upgrade-Mod, because only a small amount of pages really
have to be replaced... :'( )
Sometimes, I feel like a motherless child
https://github.com/opencart/opencart/bl ... angelog.md

But always make a full backup first, or then, install the new 'Setup' in a /shop_b/...
Subdirectory, also copy the existing DB (by use of the MyPHP Admin Tool) into a newly
created virgin DB, in full, with Tables and everthing, to play around with, but not take
a chance, to damage your existing Shop, how ever it may turn out! :choke:

Latest 1.5.6.5_rc, likely 1.5.6.4 as well, work swell, up to PHP 7.0.21, exept for its
default OC install-routine, wich requires a few minor changes, and a code-file-editor from the
OC Ext.Section, as I found out so far, just to mention it.

But I made an even older russian v.1.5.x code-editor work instead :D
http://www.ipc.li/os/admin_codeeditor.jpg

But my Bootstrap3-type responsive 'default' Product Pages failed to further function,
for a yet unknown reason, when trying PHP 7.1.x :'( but since even some latest OC-3
seem to have some problems with 7.1 , I'm not alone... :laugh:
Still, PHP 7.0.x will sure stay in operation for a good while, so, who cares...
Good Luck! ;)
Ernie
---
Image
Last edited by IP_CAM on Tue Aug 15, 2017 5:43 am, edited 1 time in total.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by thekrotek » Tue Aug 15, 2017 4:09 am

Fatal error: Call to undefined function mysql_connect() in \system\database\ipsmysql.php on line 10

mysql functions were stripped from PHP some time ago, mysqli should be used instead. If you still see this error, this means, some of your code is still calling mysql. It's hard to tell anything particular without looking into the issue more closely. If you can't look closely yourself, I'm afraid, you will have to hire someone to solve this.

Another solution is to go back to your old PHP version, when it worked. You can do this anytime.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by MrPhil » Tue Aug 22, 2017 10:23 pm

thekrotek wrote:
Tue Aug 15, 2017 4:09 am
Another solution is to go back to your old PHP version, when it worked. You can do this anytime.
Be careful doing that. Falling back to an obsolete PHP version may be attractive, but at best it's only a temporary workaround. PHP 5.2 is no longer supported and it has plenty of security holes that hackers will be happy to exploit. The danger is that you'll go back to 5.2 and get distracted by other matters, and never get around to getting to at least PHP 5.6 (7.0 is even better). Use the time gained to move up to an OC version that supports PHP 5.6 or 7.0, along with moving to that current PHP level.

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 55 guests