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
 MySQL to MySQLi questions
Author « Topic »  

RayCramblit
Advanced Member

USA
173 Posts

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

Posted - 10/23/2020 :  11:46:12  
Back again with more new coder questions.

I have a client getting error messages regarding deprecated MySQL connection scripts.

To edit the PHP version of the carts is there a guide on how and where to make edits to remove this error? Is it just a matter of editing the db_conn_open.php file or are there other edits I need to make?

Thanks in advance for any help. If you reply please "dumb down" your answer for an old guy :)



Ray Cramblit

dewers
Ecommerce Template Guru

USA
1302 Posts

Posted - 10/23/2020 :  13:46:50  
Hi Ray,

You just need to replace the bottom portion of the db_conn_open.php file with the following:


//////////////////////////////////////////////////
// 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="http://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn" target="_blank">http://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="http://www.ecommercetemplates.com/support/" target="_blank">http://www.ecommercetemplates.com/support/</a></div>';
die('</body></html>');
}


Daniel Ewers

dewers
Ecommerce Template Guru

USA
1302 Posts

Posted - 10/23/2020 :  13:49:04  
Also, just a note: If the client is running a really old version of the ECT cart, that would need updated as well.

Daniel Ewers

RayCramblit
Advanced Member

USA
173 Posts

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

Posted - 10/23/2020 :  18:32:51  
Thanks dewers!

That is a simple fix even I could do.

Ray Cramblit
  « 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