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
 How does the cart know where to find the database?
Author « Topic »  

abbyeagle
Starting Member

Australia
47 Posts

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

Posted - 01/28/2021 :  23:05:17  
Hi, I set up a developers domain separate from my website so that a coder could have free access.

1. So i downloaded the database and uploaded it to the new server.
2. I updated the db_conn_open.php file with the database name, user and password.
3. Then i updated paths in the cart admin panel.
4. I updated paths on the new website.

BUT somehow the cart on the main website is now linked to the database on the developers site.

The main site is www.abbyeagle.com
The developers site is www.dev.abbyeagle.com

I have used search and find to locate paths that need to be changed but there must still be some links that i am missing.

How does the cart know where to find the database?

Abby

Vince
Administrator

42761 Posts

Posted - 01/29/2021 :  01:52:08  
Hi Abby
If you are sharing the database between the two sites I think what you are looking for are just the parameters to override the Store URL, and that would be...
$orstoreurl='http://www.dev.abbyeagle.com';
$orstoreurlssl='http://www.dev.abbyeagle.com';

Add these to your vsadmin/includes.php file.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

abbyeagle
Starting Member

Australia
47 Posts

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

Posted - 01/29/2021 :  20:26:20  
Hi Vince,
there are 2 websites - each website has exactly the same webpages. I copied the files over.
so i had to update some of the paths in the cart pages and in the admin panel as well.

i created a new database and user name for the second site.
so there is a separate database on each domain.

i got the cart on the second site working
but then the cart of the first site failed to load any pages.
so i changed the login details in db_conn_open.php in the first site to match that of the second site and somehow it connects and works - but that does not make sense.

and then i had a customer buy a product from the first site and of course they were not able to download the digital product because it did not locate the prodfiles/product/zip

If i add $storeurlssl='https://www.abbyeagle.com'; on the first website to the vsadmin/includes.php file.
and $storeurlssl='https://www.dev.abbyeagle.com'; on the seond website- will that force the cart software to locate the correct database for each domain?

Abby

Vince
Administrator

42761 Posts

Posted - 01/30/2021 :  00:59:00  
Hi Abby
If you made these changes and the first website started having problems then it is likely that you inadvertently made changes to the first site when you were trying to change the second site. If you want me to take a look then please send the site FTP details to my email (vince AT ecommercetemplates DOT com) including details of what database each site should be using.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Vince
Administrator

42761 Posts

Posted - 02/05/2021 :  04:44:21  
Hi Abby
The database is back online for the abbyeagle shop. The problem was that you had a dollar sign in the password. In PHP this is how you specify a variable and if you have that in double quotes it tries to interpret it. So for instance...

$db_password = "mMMm$gg$PP";

...will actually end up as...

$db_password = "mMMm";

...as the two "variables" $gg and $PP will end up equating to nothing. The simple resolution is to use single quotes like this...

$db_password = 'mMMm$gg$PP';

...as that way PHP won't try and evaluate the variables. I've changed your password to use single quotes.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

abbyeagle
Starting Member

Australia
47 Posts

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

Posted - 02/05/2021 :  21:54:50  
Hi Vince, It is incredible how a tiny error can take so long for someone with basic skills to resolve. Many thanks for your help. Abby

Vince
Administrator

42761 Posts

Posted - 02/06/2021 :  02:55:23  
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000