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
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Moving to new Host and Updating Cart
Author « Topic »  

maja13
Starting Member

USA
12 Posts

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

Posted - 05/10/2018 :  07:05:20  
We are moving our site to a new host and updating the cart. All of the files are uploaded to the new host and the backup of the database has been setup. And the updater has been run. Had problems connecting to the database. When I called tech support they told me the old database is mysql and it needs to be mysqli. I am not sure how to proceed.

MAJA PRICE

Andy
ECT Moderator

95440 Posts

Posted - 05/10/2018 :  07:08:13  
Hi Maja

You'll need to change the syntax in db_conn_open.php https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737 and possibly in includes.php as mySQLi is now the default for the ECT database.

Andy

Please feel free to review / rate our software

maja13
Starting Member

USA
12 Posts

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

Posted - 05/20/2018 :  14:43:19  
Followed the post and still not able to connect to database. Here is the db_conn_open.php files:

<?php

// You host should be able to provide you with these settings if you do not know them already

$db_username = "xxxxxxx"; // Your database login username
$db_password = "xxxxxxxxxx"; // Your database login password
$db_name = "xxxxxxx"; // 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>');
}
?>

MAJA PRICE

insight
ECT Moderator

USA
4479 Posts

Posted - 05/20/2018 :  14:59:29  
Probably your host can help with that, now you've updated the connection to use mysqli. Not a great idea to post the name and password in a public forum, you might want to change those now

Peter

ServeLink
Professional ecommerce web hosting for ASP & PHP
https://servelink.com

Take a look at our image upload/resize tool for the ASP cart
https://servelink.com/clients/cart?gid=7

maja13
Starting Member

USA
12 Posts

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

Posted - 05/21/2018 :  09:16:39  
I ran a different php test file and I am connecting to the database. When you click on the php files it is not connecting. Is there something setup wrong with the php pages:

<?php
session_cache_limiter('none');
session_start();
ob_start();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="true" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

MAJA PRICE

Andy
ECT Moderator

95440 Posts

Posted - 05/21/2018 :  09:26:00  
That really should be

<?php
session_cache_limiter('none');
session_start();
ob_start();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="true" -->

without the spacing but I don't think that would cause a database connection error as such, what is the error you are receiving on the pages, can you let us know the URL?

Andy

Please feel free to review / rate our software

maja13
Starting Member

USA
12 Posts

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

Posted - 05/21/2018 :  09:54:05  
Here is the link to the home page:
http://www.new.wallacecordage.com/

Here is the a link to one of the pages that is not connecting:
http://www.new.wallacecordage.com/proddetail.php?prod=83211

MAJA PRICE

Andy
ECT Moderator

95440 Posts

Posted - 05/21/2018 :  10:14:50  
After that search field I see the Not Connected message - is that where you have the 5 PHP lines, can you copy here what code you have after the search?

Andy

Please feel free to review / rate our software

maja13
Starting Member

USA
12 Posts

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

Posted - 05/21/2018 :  10:35:05  
Is this what you need?

<form method="post" action="search.php">
<input type="hidden" name="posted" value="1"/>
<input type="text" name="stext" size="16"/><br/>
<input type="submit" name="search"/>
</form>
<?php include "vsadmin/db_conn_open.php" ?>
<?php include "vsadmin/inc/languagefile.php" ?>
<?php include "vsadmin/includes.php" ?>
<?php include "vsadmin/inc/incfunctions.php" ?>
<?php include "vsadmin/inc/incproddetail.php" ?>

MAJA PRICE

Andy
ECT Moderator

95440 Posts

Posted - 05/21/2018 :  10:43:43  
Yes and that looks fine.

Can you check with your host that everything is set up correctly on their end?

Andy

Please feel free to review / rate our software

maja13
Starting Member

USA
12 Posts

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

Posted - 05/21/2018 :  10:46:57  
I checked the files and noticed the php code wasn't correct for the includes.php file.
Now I have all kinds of errors:

Unknown column 'adminStoreURLSSL' in 'field list'
Fatal error: Uncaught Error: Call to a member function fetch_assoc() on boolean in /home/g29eqi74iqz9/public_html/vsadmin/inc/incfunctions.php:2184 Stack trace: #0 /home/g29eqi74iqz9/public_html/vsadmin/inc/incfunctions.php(59): ect_fetch_assoc(false) #1 /home/g29eqi74iqz9/public_html/vsadmin/inc/incproddetail.php(730): getadminsettings() #2 /home/g29eqi74iqz9/public_html/proddetail.php(64): include('/home/g29eqi74i...') #3 {main} thrown in /home/g29eqi74iqz9/public_html/vsadmin/inc/incfunctions.php on line 2184

MAJA PRICE

Andy
ECT Moderator

95440 Posts

Posted - 05/21/2018 :  10:51:04  
That would suggest the database and files were on different versions and running the updater would sort it out.

Andy

Please feel free to review / rate our software

maja13
Starting Member

USA
12 Posts

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

Posted - 05/21/2018 :  11:03:01  
That did the trick! Now on to testing. Thank you!

MAJA PRICE

maja13
Starting Member

USA
12 Posts

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

Posted - 05/21/2018 :  17:51:26  
Everything is looking good until I get to the cart. The cart.php page shows this:

Shopping Cart (2)
DetailsNameUnit PriceQuant. Total
20712#12 Twisted White Nylon Twine 1 lb TubeIllegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_german2_ci,IMPLICIT) for operation '='
Fatal error: Uncaught Error: Call to a member function free_result() on boolean in /home/g29eqi74iqz9/public_html/vsadmin/inc/incfunctions.php:2193 Stack trace: #0 /home/g29eqi74iqz9/public_html/vsadmin/inc/inccart.php(6054): ect_free_result(false) #1 /home/g29eqi74iqz9/public_html/cart.php(59): include('/home/g29eqi74i...') #2 {main} thrown in /home/g29eqi74iqz9/public_html/vsadmin/inc/incfunctions.php on line 2193


Also on theAdmin Panel everything is good until I select a product to edit (adminprods.php)
'; var scrwid=screen.width; var scrhei=screen.height; var newwin=window.open("","uploadimage",'menubar=no,scrollbars=yes,width='+winwid+',height='+winhei+',left='+((scrwid-winwid)/2)+',top=100,directories=no,location=no,resizable=yes,status=no,toolbar=no'); newwin.document.open(); newwin.document.write(prnttext); newwin.document.close(); newwin.focus(); } function imagemanager(){ if(document.getElementById('extraimages').style.display=='none'){ document.getElementById('extraimages').style.display=''; document.getElementById('lessimages').style.display='none'; document.getElementById('lessimages2').style.display='none'; document.getElementById('but_pImage').value="Close Image Mgr."; document.getElementById('pImage').disabled=true; document.getElementById('smallimup').style.display='none'; document.getElementById('moreimages').style.display=''; }else{ document.getElementById('extraimages').style.display='none'; document.getElementById('lessimages').style.display=''; document.getElementById('lessimages2').style.display=''; document.getElementById('but_pImage').value="Image Mgr."; document.getElementById('pImage').disabled=false; document.getElementById('smallimup').style.display=''; document.getElementById('moreimages').style.display='none'; } } function moreimagefn(){ var thetable=document.getElementById('extraimagetable'); var currmax=parseInt(document.getElementById('maximgindex').value); for(imindx=currmax; imindx '; newcell=newrow.insertCell(1); newcell.style.whiteSpace='nowrap'; newcell.innerHTML='
'; newcell=newrow.insertCell(2); newcell.style.whiteSpace='nowrap'; newcell.innerHTML='
'; } document.getElementById('maximgindex').value=imindx; } function setstatic(setting){ if(setting==0){ document.getElementById('staticpagediv').style.display=''; document.getElementById('staticurldiv').style.display='none'; }else{ document.getElementById('staticpagediv').style.display='none' document.getElementById('staticurldiv').style.display=''; } } function displaymultilangname(){ for(var index=2;index<=3;index++){ if(document.getElementById('pName'+index))document.getElementById('pName'+index).style.display='block'; } } function getectobj(objid){ return(document.getElementById(objid)); } function expandckeditor(objtxt,editornumber){ for(index=1;index<=3;index++){ if(document.getElementById('editordiv'+objtxt.substr(0,4)+index))document.getElementById('editordiv'+objtxt.substr(0,4)+index).style.display=''; } if(document.getElementById('editordiv'+objtxt.substr(0,4)+editornumber)){ document.getElementById('editordiv'+objtxt.substr(0,4)+editornumber).style.border='none'; document.getElementById('editordiv'+objtxt.substr(0,4)+editornumber).style.padding=0; } getectobj('descshort').style.width=objtxt.substr(0,4)=='pDes'?'60%':'40%'; getectobj('desclong').style.width=objtxt.substr(0,4)=='pDes'?'40%':'60%'; } function displaymultilangdescs(islongdesc,thisobj){ var setobj; for(var index=2;index<=3;index++){ if(document.getElementById('pDescription'+index))document.getElementById('pDescription'+index).style.display='block'; if(document.getElementById('pLongDescription'+index))document.getElementById('pLongDescription'+index).style.display='block'; } for(var index=1;index<=3;index++){ if(!islongdesc){ if(setobj=getectobj('pDescription'+(index==1?'':index)))setobj.style.width='500px'; if(setobj=getectobj('pLongDescription'+(index==1?'':index)))setobj.style.width='300px'; if(index==thisobj){ if(setobj=getectobj('pDescription'+(index==1?'':index)))setobj.style.height='200px'; if(setobj=getectobj('pLongDescription'+(index==1?'':index)))setobj.style.height='100px'; }else{ if(setobj=getectobj('pDescription'+(index==1?'':index)))setobj.style.height='100px'; if(setobj=getectobj('pLongDescription'+(index==1?'':index)))setobj.style.height='100px'; } } if(islongdesc){ if(setobj=getectobj('pDescription'+(index==1?'':index)))setobj.style.width='300px'; if(setobj=getectobj('pLongDescription'+(index==1?'':index)))setobj.style.width='500px'; if(index==thisobj){ if(setobj=getectobj('pDescription'+(index==1?'':index)))setobj.style.height='100px'; if(setobj=getectobj('pLongDescription'+(index==1?'':index)))setobj.style.height='200px'; }else{ if(setobj=getectobj('pDescription'+(index==1?'':index)))setobj.style.height='100px'; if(setobj=getectobj('pLongDescription'+(index==1?'':index)))setobj.style.height='100px'; } } } } function checkrequiredfields(){ document.getElementById('newid').style.borderColor=(document.getElementById('newid').value.replace(/ /g,'')==''?'red':''); document.getElementById('pName').style.borderColor=(document.getElementById('pName').value.replace(/ /g,'')==''?'red':''); document.getElementById('pPrice').style.borderColor=(document.getElementById('pPrice').value.replace(/ /g,'')==''?'red':''); document.getElementById('psection').style.borderColor=(document.getElementById('psection').selectedIndex==0?'red':''); } function createextrapbrow(tnum){ var rownum=parseInt(document.getElementById('pricebreakrows').value); if(rownum==tnum){ rownum++; document.getElementById('pricebreakrows').value=rownum; var newdiv=document.createElement('div'); newdiv.style.display='table-row'; newdiv.style.fontSize='11px'; newdiv.innerHTML='


'; document.getElementById('pricebreaktable').appendChild(newdiv); } } /* ]]> */
You are modifying the product "#0(60) 1 lb Cotton Twine"

MAJA PRICE

Andy
ECT Moderator

95440 Posts

Posted - 05/22/2018 :  00:00:49  
Hi Maja

Go into the admin database utility page under Store Admin and click Set Database Collation and you'll probably see different collations in the list. I would choose to use latin1_swedish_ci or utf8_general_ci for all.

That code stuff in the product admin page is because your host has a stats package installed that is adding extra code to your admin pages. You'll need to ask them to turn that off.

Andy

Please feel free to review / rate our software

maja13
Starting Member

USA
12 Posts

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

Posted - 05/22/2018 :  05:51:06  
Thank you! I will talk to GoDaddy.

MAJA PRICE

Phil
ECT Moderator

United Kingdom
7715 Posts

Posted - 05/22/2018 :  06:29:35  
Take a look at this post here, you should be able to remove that from your host control panel - https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=109587



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.05 seconds. Snitz Forums 2000