Zen Cart Logo
Forums / Upgrading to 1.5.x / Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Views: 4,494

Results 1 to 16 of 16
23 Jun 2022, 8:37 PM
#1
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Sorry I can't tell you what ZC version is on https://alanachurch.com because I can't enter it at all. The index page works but the entire library, normally accessible at https://alanachurch.com/library, just displays the error message:

"Call to undefined function: mysql_connect(). Please install the MySQL Connector for PHP"

I think HostGator screwed with some settings, but they're refusing to answer my queries for help. So I don't know that for sure, either. None of the other sites we're hosting have been affected, though.

I know I need to upgrade the ZC version, and I'm hoping that will help. But php and I have a longstanding hate-hate relationship, so I'm very leery about the process at the best of times. Doubly so when this is a fairly old shopping cart, so I don't know which set of procedures I need to follow.

So...please help? I appreciate it very much!

23 Jun 2022, 9:03 PM
#2
lat9 avatar

lat9

Administrator

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

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

You can find the base Zen Cart version by logging into your site's cPanel and, using the File Manager, view the (normally) public_html/includes/version.php.

It sounds like your custom (?) library is using the older mysql* functions (which are no longer supported) instead of the mysqli* functions (which are).

23 Jun 2022, 9:09 PM
#3
swguy avatar

swguy

Administrator

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

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Doubly so when this is a fairly old shopping cart, so I don't know which set of procedures I need to follow.

Here are the procedures:
https://docs.zen-cart.com/user/upgrading/

29 Jun 2022, 7:13 PM
#4
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Okay, I went through every step of the Upgrading link you sent me, and followed the instructions. It's taken me 3 days to go through every file and try to catch all the changes that were made to the original. I'm pretty sure I got all of them. So I uploaded the new files per instruction. Now I'm getting this error message:

WARNING: An Error occurred, please refresh the page and try again.

Not very helpful.

29 Jun 2022, 7:14 PM
#5
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

go look in the mydebug logs "WARNING: An Error occurred, please refresh the page and try again." is always a database error

29 Jun 2022, 7:27 PM
#6
swguy avatar

swguy

Administrator

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

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Here's how the logs @barco57 referenced work:

https://docs.zen-cart.com/user/troubleshooting/debug_logs/

29 Jun 2022, 8:22 PM
#7
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

[29-Jun-2022 14:48:12 America/Chicago] Request URI: /library/index.php?main_page=product_info&cPath=66_96&products_id=316, IP address: 66.249.73.136
#1 trigger_error() called at [/home2/boruma/public_html/alanachurch.com/library/includes/classes/db/mysql/query_factory.php:170]
#2 queryFactory->show_error() called at [/home2/boruma/public_html/alanachurch.com/library/includes/classes/db/mysql/query_factory.php:142]
#3 queryFactory->set_error() called at [/home2/boruma/public_html/alanachurch.com/library/includes/classes/db/mysql/query_factory.php:226]
#4 queryFactory->Execute() called at [/home2/boruma/public_html/alanachurch.com/library/includes/classes/PluginManager.php:29]
#5 Zencart\PluginManager\PluginManager->getInstalledPlugins() called at [/home2/boruma/public_html/alanachurch.com/library/includes/application_top.php:192]
#6 require(/home2/boruma/public_html/alanachurch.com/library/includes/application_top.php) called at [/home2/boruma/public_html/alanachurch.com/library/index.php:25]
--> PHP Fatal error: 1146:Table 'boruma_zncr3.zc_plugin_control' doesn't exist :: SELECT * FROM zc_plugin_control WHERE status = 1 ==> (as called by) /home2/boruma/public_html/alanachurch.com/library/includes/classes/PluginManager.php on line 29 <== in /home2/boruma/public_html/alanachurch.com/library/includes/classes/db/mysql/query_factory.php on line 170.

29 Jun 2022, 10:51 PM
#8
swguy avatar

swguy

Administrator

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

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Perhaps you didn't run zc_install?

29 Jun 2022, 11:22 PM
#9
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

I handled it the way I've done other upgrades: I renamed the zc_install folder to match what was already on the server, and simply uploaded all the files. New files overwrote the old files, and it worked perfectly first time, every time. Why shouldn't it do the same this time?

30 Jun 2022, 12:28 AM
#10
swguy avatar

swguy

Administrator

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

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

You must be thinking of the admin folder.

zc_install is a procedure you need to run during an upgrade. The folder zc_install isn't on a live site; you upload it, run zc_install and then remove it.

Click the link I posted earlier and read it; it describes running the zc_install process.

7 Jul 2022, 7:28 PM
#11
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Okay, partial success. The site looks okay except for the "Congratulations!" message on the index page.

I want to remove that message, but now I can't log in. The username/password no longer works. I asked for and received a new temporary password, but that's not letting me in, either. I'm not getting any error messages; it just keeps cycling back to the same login page.

Suggestions? :(

7 Jul 2022, 7:36 PM
#12
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

I also tried to do a test purchase, and it won't let me log in to complete the purchase. Same problem: No error message; it just keeps cycling back to that page's same login page.

8 Jul 2022, 1:22 AM
#13
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Forgot to mention, I cleared my cache and cookies, then went through the whole Reset Admin Password in the phpMyAdmin, too. That didn't work, either. Admin / admin do not log me into the site. Same thing happens: The page refreshes and inserts my original login information that doesn't work anymore.

11 Jul 2022, 8:12 PM
#14
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

Please help? I really need to get this fixed for my author. Thank you!

13 Jul 2022, 5:58 PM
#15
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

https://docs.zen-cart.com/user/new_user_topics/congratulations/

I created an account and logged out, and l logged back in... after figuring out that the only way to log back in was to put something else in the cart and go to checkout to force the login page. Also if you move back into the catalog you can not get back to the cart to checkout without placing something else in the cart... wtf? You can logout with the tiny link in the footer but you need to either know how to change the URL to get back to the login or stick something in the cart and try to move into the checkout to get the login, the footer link stays as log off throughout the process...sigh. Additionally, when you are either on the registration or login I get warnings that the form is unsecured because the template has not been adjusted to make the form secure as its action is still posting to an unsecured action. The logo in the header doesn't link to anything so the only way to get back to the homepage is to adjust the URL manually or click the tiny link far right bottom of the site(oops forgot about the breadcrumbs but standard UI would be to have the logo link to index). The UX on this site is horrible, it screams old template that was poorly implemented originally and not updated.

24 Jul 2022, 10:49 PM
#16
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Call to undefined function: mysql_connect(). Please install the MySQL Connector for P

It is an old template and I'd like to update it, but that's not my talent. As you may have guessed, I totally suck at php. I may be able to figure out how to make the logo clickable, but it's been a very long time since I've done something like that.

I'm still having the same problem...I try to log in and it refreshes the login page without accepting anything. I click Forgot Password and try to use the new password I'm assigned, but the same thing is happening.

I can't fix anything if I can't log in, so could you please help me fix this problem? Then I can start to address the rest. Thank you!