Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Call to undefined function mysql_query()
Author « Topic »  

stevepope
Starting Member

USA
10 Posts

Pre-sales questions only
(More Details...)

Posted - 12/19/2019 :  04:24:28  
I am running ECT 7.1.4 and php version 7.3.

I getting the following error: PHP Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home2/aftonalp/public_html/vsadmin/inc/languagefile.php:10

The offending code: return(@$GLOBALS['ectdatabase']?$GLOBALS['ectdatabase']->query($ectsql):mysql_query($ectsql));

mysql_query was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. How do I address this? Has the code been updated in later updaters? Please advise.

Steve Pope

Vince
Administrator

42472 Posts

Posted - 12/19/2019 :  04:40:27  
Hi Steve
You need to use the new PHP mySQLi connection type and there are details here about how to do that...

https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737

It's just a bit of copy and paste to your db_conn_open.php

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

stevepope
Starting Member

USA
10 Posts

Pre-sales questions only
(More Details...)

Posted - 12/19/2019 :  06:02:45  
Your response and the link you provide do not address my issue. The article you link to only shows how to change the database occurrence. My issue is in the languagefile.php (See my original post.) I'm assuming that this is not the only file where mysql_query() is used. Do I have to go through and manually change every occurrence in every file?

Steve Pope

Vince
Administrator

42472 Posts

Posted - 12/19/2019 :  07:47:48  
Hi Steve
Once the database occurrence is changed as in the link I provided the language file and all other parts of the template will use a mySQLi connection. You see both because we support both, but if you change the database connection as I mentioned the mySQLi connection will be used.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000