quantum503
Advanced Member
United Kingdom
230 Posts Pre-sales questions only (More Details...)
|
Posted - 02/07/2017 : 10:51:08
Hi
I'm want to upgrade my PHP version to 7.1, so I've tried to run the store updater 6.6.1 and everything seems to work OK while PHP is 5.6. I got the confirmation that everything had been successfully updated to 6.6.1, although the admin section still said 6.5.5 (which I didn't understand).
But as soon as I switch to PHP 7.1 I get the following on the home page: Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/****/public_html/vsadmin/inc/languagefile.php:10
and the control panel gives me: Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/****/public_html/vsadmin/inc/incfunctions.php:2174 Stack trace: #0 /home/****/public_html/vsadmin/inc/incfunctions.php(56): ect_query('SELECT adminEma...') #1 /home/****/public_html/vsadmin/inc/incloginfunctions.php(13): getadminsettings() #2 /home/****/public_html/vsadmin/login.php(18): include('/home/****...') #3 {main} thrown in /home/****/public_html/vsadmin/inc/incfunctions.php on line 2174
Any idea what has gone wrong?
Thanks Eric Lewis
|
Andy
ECT Moderator
95440 Posts |
Posted - 02/07/2017 : 11:00:05
|
quantum503
Advanced Member
United Kingdom
230 Posts Pre-sales questions only (More Details...)
|
Posted - 02/07/2017 : 11:36:35
Hi Andy
I did get the 'everything successfully updated' message when I was using PHP 5.6. I tried running it again now that the server is on PHP 7.1 and got this:
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/****/public_html/updatestore.php:55 Stack trace: #0 /home/****/public_html/updatestore.php(3586): ect_query('SELECT payProvE...') #1 {main} thrown in /home/****/public_html/updatestore.php on line 55
Eric Lewis
|
Andy
ECT Moderator
95440 Posts |
Posted - 02/07/2017 : 12:12:01
Can you make sure your db_conn_open.php uses the following format (with your username, password etc) <?php // You host should be able to provide you with these settings if you do not know them already $db_username = "YourUserName"; // Your database login username $db_password = "Yourpassword"; // Your database login password $db_name = "yourdatabasename"; // The name of the database you wish to use $db_host = "location of database"; // The address of the database. Often this is localhost, but may be for example db.yoursite.com ////////////////////////////////////////////////// // Please do not edit anything below this line. // ////////////////////////////////////////////////// $GLOBALS['ectdatabase'] = new mysqli($db_host, $db_username, $db_password, $db_name); if(mysqli_connect_error()){ ob_clean(); print '<html><head><title>Database connect error</title></head><body><div style="margin:20px;clear:both">Database Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error() . '</div>'; print('<div style="margin:20px;clear:both">You need to set your database connection in vsadmin/db_conn_open.php</div>'); print '<div style="margin:20px;clear:both">For help setting your database connection please see...<br />'; print '<a href="https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn" target="_blank">https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn</a></div>'; print '<div style="margin:20px;clear:both">We also have a support forum here...<br />'; print '<a href="https://www.ecommercetemplates.com/support/" target="_blank">https://www.ecommercetemplates.com/support/</a></div>'; die('</body></html>'); } ?> Andy Please feel free to review / rate our software

|
quantum503
Advanced Member
United Kingdom
230 Posts Pre-sales questions only (More Details...)
|
Posted - 02/08/2017 : 02:45:11
Hi Andy
Yes, I'm using that.
Eric
|
Andy
ECT Moderator
95440 Posts |
Posted - 02/08/2017 : 03:03:48
That should be fine then. I'll check with Vince for you. Line 55 is return(@$GLOBALS['ectdatabase']?$GLOBALS['ectdatabase']->query($ectsql):mysql_query($ectsql)); and I'm not sure why that's throwing an error for you. Andy Please feel free to review / rate our software
|
Vince
Administrator
42874 Posts |
Posted - 02/08/2017 : 03:10:26
|
quantum503
Advanced Member
United Kingdom
230 Posts Pre-sales questions only (More Details...)
|
Posted - 02/08/2017 : 04:58:28
Hi Vince
Here it is:
$GLOBALS['ectdatabase'] = new mysqli($db_host, $db_username, $db_password, $db_name); if(mysqli_connect_error()){ ob_clean(); print '<html><head><title>Database connect error</title></head><body><div style="margin:20px;clear:both">Database Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error() . '</div>'; print('<div style="margin:20px;clear:both">You need to set your database connection in vsadmin/db_conn_open.php</div>'); print '<div style="margin:20px;clear:both">For help setting your database connection please see...<br />'; print '<a href="https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn" target="_blank">https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn</a></div>'; print '<div style="margin:20px;clear:both">We also have a support forum here...<br />'; print '<a href="https://www.ecommercetemplates.com/support/" target="_blank">https://www.ecommercetemplates.com/support/</a></div>'; die('</body></html>'); } ?>
</SCRIPT>
Thanks
Eric Lewis

|
Vince
Administrator
42874 Posts |
Posted - 02/08/2017 : 05:05:03
|
Vince
Administrator
42874 Posts |
Posted - 02/08/2017 : 11:00:39
|
quantum503
Advanced Member
United Kingdom
230 Posts Pre-sales questions only (More Details...)
|
Posted - 02/09/2017 : 02:19:02
Vince
Does that mean I should run the updater again for other sites that will be migrated to PHP 7.1?
Eric Lewis
|
Andy
ECT Moderator
95440 Posts |
Posted - 02/09/2017 : 02:41:16
|
quantum503
Advanced Member
United Kingdom
230 Posts Pre-sales questions only (More Details...)
|
Posted - 02/09/2017 : 04:44:13
Thanks guys
First class help as always.
Eric Lewis
|
ITZAP
Ecommerce Template Guru
Australia
1018 Posts |
Posted - 02/09/2017 : 06:55:37
But would you actually recommend running PHP 7.1 Vince ? Any distinct advantage in that ? Or should we leave well enough alone and remain on PHP 5.6 ? Gary 
|
Vince
Administrator
42874 Posts |
Posted - 02/10/2017 : 08:24:10
|
seventh-gear
Advanced Member
USA
116 Posts Pre-sales questions only (More Details...)
|
Posted - 01/24/2019 : 17:05:13
Hi,
My host finally stopped providing support for PHP 5.6 so today I switched to PHP 7.2, and I am having this same problem. I'm current with ECT v7.0.3.
Unfortunately I guess I'm not understanding the solution explained. I tried modifying db_conn_open.php the way I thought was explained, but it just generated another error:
Call to undefined function mysql_connect() in /homepages/43/d162641710/htdocs/****/vsadmin/db_conn_open.php:14 Stack trace: #0 /homepages/43/d162641710/htdocs/****/index.php(62): include() #1 {main} thrown
Any help would be appreciated, Thanks
Eric
|
seventh-gear
Advanced Member
USA
116 Posts Pre-sales questions only (More Details...)
|
Posted - 01/24/2019 : 22:10:05
Figured it out.... Thanks.
|
Vince
Administrator
42874 Posts |
Posted - 01/25/2019 : 01:11:06
|
|
|