Post by Evilonion » Wed Oct 02, 2019 5:39 pm

Hi, I have the site running 3.02
I upgraded the php version to 7.2 and the error logs are full of this error:

PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /var/sites/f/website/public_html/system/library/db/mysqli.php on line 10

I contacted the host and they said to lower the version number as mysqli is version 7 and above.
The only issue there is that the next available version down is 5.6 and the site does not work if I select that.

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by thekrotek » Wed Oct 02, 2019 6:04 pm

But you have an issue related exactly to mysqli. Looks like it simply isn't enabled on your server.

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


User avatar
Expert Member
Online

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Evilonion » Wed Oct 02, 2019 6:34 pm

From php info page

mysqli.allow_local_infile On
mysqli.allow_persistent On
mysqli.default_host value no mysqli.default_port33063306
mysqli.default_pw no value no mysqli.default_socket/var/lib/mysql/mysql.sock/var/lib/mysql/mysql.sockmysqli.default_user no value no
mysqli.max_links Unlimited mysqli.max_persistent Unlimited
mysqli.reconnect On
mysqli.rollback_on_cached_plink Off
mysqlndmysqlnd enabled
Versionmysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $Compressionsupportedcore SSLsupportedextended SSLsupportedCommand buffer size4096
Read buffer size32768
timeout31536000
Collecting statistics Yes
Collecting memory statistics No
Tracingn/aLoaded pluginsmysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_sha256_passwordAPI Extensionsmysqli,pdo_mysql

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by Nathaniel2019 » Wed Oct 02, 2019 7:13 pm

thekrotek wrote:
Wed Oct 02, 2019 6:04 pm
But you have an issue related exactly to mysqli. Looks like it simply isn't enabled on your server.
"LOOKS LIKE IT SIMPLY ISNT ENABLED ON YOUR SERVER"

Newbie

Posts

Joined
Tue Sep 03, 2019 11:50 pm

Post by Evilonion » Wed Oct 02, 2019 9:57 pm

Mysqli is enabled.
The host has told me it's an opencart issue and likely wrong config... any ideas?

php
// HTTP
define('HTTP_SERVER', 'https://*****/');

// HTTPS
define('HTTPS_SERVER', 'https://*****/');

// DIR
define('DIR_APPLICATION', '/var/sites/f/*****/public_html/catalog/');
define('DIR_SYSTEM', '/var/sites/f/*****/public_html/system/');
define('DIR_IMAGE','/var/sites/f/*****/public_html/image/');
define('DIR_STORAGE', '/var/sites/f/*****/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', '*****');
define('DB_USERNAME', '*****');
define('DB_PASSWORD', '*****');
define('DB_DATABASE', '*****');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by paulfeakins » Wed Oct 02, 2019 10:30 pm

Evilonion wrote:
Wed Oct 02, 2019 5:39 pm
I contacted the host and they said to lower the version number as mysqli is version 7 and above.
The only issue there is that the next available version down is 5.6 and the site does not work if I select that.
Either use PHP 5.6 - not recommended as it may not be secure.
Or install mysqli, your host should do that for you or at least tell you how.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by thekrotek » Wed Oct 02, 2019 10:36 pm

Evilonion wrote:
Wed Oct 02, 2019 9:57 pm
Mysqli is enabled.
The host has told me it's an opencart issue and likely wrong config... any ideas?
No, it is NOT an OpenCart issue and mysqli is not functioning properly on your server. Contact your hosting support on the matter.

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


User avatar
Expert Member
Online

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by Evilonion » Wed Oct 02, 2019 10:57 pm

Ok thankyou for replying
I have contacted the host and even though mysqli is enabled they have made a new php.ini file and enabled mysqli there.
This seems to have resolved the issue but I wont know for an hour or so when I check error logs again.

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by paulfeakins » Wed Oct 02, 2019 11:39 pm

Evilonion wrote:
Wed Oct 02, 2019 10:57 pm
This seems to have resolved the issue but I wont know for an hour or so when I check error logs again.
Surely nothing would work if that wasn't correctly installed, so if it seems to be working, it probably is.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by Evilonion » Thu Oct 03, 2019 6:01 am

Ok so since the php.ini file was created I'm getting lots of this error repeating:

PHP Warning: mysqli::query(): MySQL server has gone away in /var/sites/f/****.co.uk/public_html/system/library/db/mysqli.php on line 18

PHP Warning: mysqli::query(): Error reading result set's header in /var/sites/f/****.co.uk/public_html/system/library/db/mysqli.php on line 18

Active Member

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by by mona » Thu Oct 03, 2019 6:40 am

This sounds like your server connection is timing out
It is still a hosting issue ...

(it could possibly be that your site is being backed-up, but that should have cleared already)

Active Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by paulfeakins » Thu Oct 03, 2019 4:52 pm

Evilonion wrote:
Thu Oct 03, 2019 6:01 am
MySQL server has gone away
Usually means your host doesn't have enough resources for your site.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: thekrotek and 32 guests