Posted - 03/31/2020 : 14:00:04
Hi matrix
DO KEEP A BACKUP OF FILES BEFORE CHANGING ANYTHING
You will need to edit the db_conn_open.php as the syntax has changed from your old version. That file is in the vsadmin folder. It is NEVER overwritten with updaters.
At the moment leave the php @ 5.6.
Your old file will be the same as this.
<SCRIPT language="php">
// You host should be able to provide you with these settings if you do not know them already
$db_username = ""; // Your database login username $db_password = ""; // Your database login password $db_name = ""; // 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. // //////////////////////////////////////////////////
$dbh=mysql_connect($db_host, $db_username, $db_password) or die ('You need to set your database connection in vsadmin/db_conn_open.php.</td></tr></table></body></html>'); mysql_select_db($db_name) or die ('You need to set your database connection in vsadmin/db_conn_open.php.</td></tr></table></body></html>');
</SCRIPT>
---------------------------------------------------
The current (later) file is as such and what you need to be using. Copy your connection info into the file contents below and upload that to your server.
<?php
// You host should be able to provide you with these settings if you do not know them already
$db_username = ""; // Your database login username $db_password = ""; // Your database login password $db_name = ""; // 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>'); } ?>
Are you using the old website files with a view to just updating to a later version? If so, there are the ectcart.css & ectcart.js files that will need to be in the <head>of all your store pages.
<link rel="stylesheet" href="css/ectstyle.css" /> <link rel="stylesheet" href="css/ectcart.css" />
Steve Bolton, Lancashire, UK
Remember - Any edits to the ectcart.css file will be overwritten by updater's. ALL edits to ectcart.css rules should be placed in your style.css file
Edited by - 1818charlie on 03/31/2020 19:38:41
|