Posted - 11/05/2019 : 08:44:12
I'm working on changing an ECT website which I created about 10 years ago in Dreamweaver to WordPress. This is a super busy store, so I'm making this change in an unusual way.
First - I created a new WordPress site on my own testing server; complete with a copy of the entire current live site, databases and all. I finished and fully tested that site on my servers.
Second - My client purchased their own VPS hosting and we had the current live site (not the new WordPress site) copied to their new server.
Third - I took a "Duplicator" copy of the new WP site and uploaded it to the new VPS hosting. Keep in mind this new VPS server is only using the "temp URL" and is not currently live - their OLD site, on my servers are running so that there will be no interruption in their business.
Fourth - I have modified my "hosts" file so that I can easily work on their new site on their VPS temp URL (this is why I can't give you a link).
OK...now the problem I having -- most things seem to be working and looking like I want them. However; when I try and add something to the cart, I'm getting this error message:
The following product isn't currently available in our store: Fatal error: Uncaught Error: Class 'mysqli' not found in /home/alkydigg/public_html/vsadmin/db_conn_open.php:14 Stack trace: #0 /home/alkydigg/public_html/vsadmin/shipservice.php(14): include() #1 {main} thrown in /home/alkydigg/public_html/vsadmin/db_conn_open.php on line 14
This is the contents of my db_conn_open.php -- usernames and passwords removed of course:
<?php
// You host should be able to provide you with these settings if you do not know them already
$db_username = "XXXXX"; // Your database login username $db_password = "XXXXX"; // Your database login password $db_name = "XXXXX"; // The name of the database you wish to use $db_host = "localhost"; // 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>'); } ?>
|