Forums / Installing on a Linux/Unix Server / Problems with your MySQL (mysqli) support

Problems with your MySQL (mysqli) support

Views: 7,523

Results 1 to 13 of 13
12 Apr 2016, 1:00 PM
#1
jacques_smit avatar

jacques_smit

New Zenner

Join Date:
Apr 2016
Posts:
2
Plugin Contributions:
0

Problems with your MySQL (mysqli) support

HI

Trying to install Zencart onto my domain and not getting past the following.

Any idea what to do?

ISP / Host says that my hosting platform does support musqli

System Inspection
TIP: For some errors and warnings below, more information may be available by clicking on the error/warning title.
Some problems that need fixing before we continue
Problems with your MySQL (mysqli) support

12 Apr 2016, 1:09 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Problems with your MySQL (mysqli) support

You might ask your current web-host why they've chosen not to support mysqli, given that the mysql support in PHP has been removed starting with PHP 7.0.

It they're not bendable on that, you'll need to find a new web-host for your later-than-v1.5.2 Zen Cart.

12 Apr 2016, 1:13 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Problems with your MySQL (mysqli) support

Perhaps you could generate the php settings to see what is currently seen by your ZC site area.

Create a file with a "random" name of your choosing with the extension .php and store it at a location accessible by your store's url (ie. In the root of your store) with the following contents:

<?php echo phpinfo(); ?>

Then point your browser to that file, copy and paste the result then remove the file.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

12 Apr 2016, 1:13 PM
#4
jacques_smit avatar

jacques_smit

New Zenner

Join Date:
Apr 2016
Posts:
2
Plugin Contributions:
0

Re: Problems with your MySQL (mysqli) support

I have asked them and they said it is supported. Will confirm again, and that in fact my domain has feature.

as per myphp

Web server

cpsrvd 11.54.0.21
Database client version: libmysql - 5.1.73
PHP extension: mysqli Documentation
29 Dec 2023, 7:30 PM
#5
pixodaros avatar

pixodaros

New Zenner

Join Date:
May 2023
Location:
Canada
Posts:
56
Plugin Contributions:
0

Re: Problems with your MySQL (mysqli) support

I am also getting this error when I try to create a new install at MYDOMAIN/1.5.8 I set that folder to use PHP version: 8.2.13 whereas the root folder (which is still running Zen Cart 1.5.4) still has PHP version: 5.6.40

in cPanel > Select PHP Version I see mysqli enabled. Running phpinfo(); in MYDOMAIN/1.5.8 throws hundreds of lines of content. The Configure Command section does have:

'./configure' '--prefix=/usr' ... '--without-mysqli' 

I will keep exploring Stack Overflow and the PHP and MySQL documentation.

29 Dec 2023, 8:26 PM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: Problems with your MySQL (mysqli) support

There was a time when you had to run the PHP Configuration tool in cPanel and check a box that you wanted mysqli. Perhaps your hoster has something similar.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Dec 2023, 10:08 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Problems with your MySQL (mysqli) support

Additionally, may want to consider setting up this additional store using a sub domain. The sub domain could still be in this sub directory off your main site, but the alternate php configuration may play better.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

29 Dec 2023, 11:29 PM
#8
pixodaros avatar

pixodaros

New Zenner

Join Date:
May 2023
Location:
Canada
Posts:
56
Plugin Contributions:
0

Re: Problems with your MySQL (mysqli) support

cPanel shows mysqli as enabled with the default PHP version. The host is tweaking some things and they may have a recommended fix.

Zen Cart seems to expect that a few files like favicon.io are in specific places relative to the root.

Creating a site in a subdomain like store.DOMAINNAME.TLD is kind of trendy.

30 Dec 2023, 12:28 AM
#9
pixodaros avatar

pixodaros

New Zenner

Join Date:
May 2023
Location:
Canada
Posts:
56
Plugin Contributions:
0

Re: Problems with your MySQL (mysqli) support

The host seems to have set it up so that nd_mysqli overrides mysqli. "nd_pdo_mysql appears to be a custom plugable extension provided by the cPanel hosting platform in order to opt-in the MySQL Native Driver in run-time. " (Stack Overflow) Nobody on the ZC support forum seems to have had trouble with a host using nd_mysqli instead of the basic mysqli extension until now so I am talking to the host.

The Zen Cart 1.5.4 install seems to still work with PHP 7.4 but we have not tried moving all the way to 8.2 since the language changed so much.

30 Dec 2023, 3:57 AM
#10
pixodaros avatar

pixodaros

New Zenner

Join Date:
May 2023
Location:
Canada
Posts:
56
Plugin Contributions:
0

Re: Problems with your MySQL (mysqli) support

When we remove the .htaccess rule trying to enable a different PHP version than the server default, the errors about missing PHP extensions go away, and there is just a warning "For maximum security and compatibility you should be using PHP 8.0 or newer. " (Currently the default is PHP 7.4 so that the ZC 1.5.4 install continues to work).

30 Dec 2023, 9:09 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Problems with your MySQL (mysqli) support

Some of the latest cPanel updates are not providing "mysqli" as an extension. (Those same cPanel updates are also progressively pushing forward with things that will eventually make your old ZC 1.5.4 unable to run without upgrading.)

In the meantime, you can bypass zc_install's check for "mysqli" by editing one of the zc_install files:

/zc_install/includes/systemChecks.yml (around line 70 depending on the ZC version):

  mysqlExt:
     runLevel: always
     errorLevel: FAIL
     criticalError: true

Make 2 changes to that "mysqlExt:" section: change that FAIL to WARN, and remove the criticalError: true line.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Feb 2024, 4:40 AM
#12
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Problems with your MySQL (mysqli) support

Not sure if this is the right place for this, but here goes...

Recently I (finally) upgraded to 1.5.7 from 1.5.6 (and yes I am currently working on 1.5.8).

I've been live with 1.5.7 since feb 5th and it's been running fine, except I was looking at the logs the other day and on the 13th I had several instances of this -

PHP Warning: mysqli_connect(): (HY000/1040): Too many connections in /home/funkybal/public_html/zencart/includes/classes/db/mysql/query_factory.php on line 63.

I've never come across this before and it hasn't occurred since.

Is this possibly a one off where too many people were trying to access my zencart or could something else be an issue?

For the record I make use of multisite, my zencart has 12 faces which are geographic representations of my store. One theory is being the 13th I might have had a spike in activity across all sites for people desperate to order for valentines day?

19 Feb 2024, 8:28 AM
#13
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Problems with your MySQL (mysqli) support

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...