Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Connect to storefront and database on a different server.

    PHP 5.6.40 PHPMyAdmin version: 7.3.27 Fast and Easy Checkout

    Last week my zen-cart was copied to another domain because I couldn't stop google from throwing a phishing warning on my Zen-cart storefront order page.

    Both zen-carts, on 2 different domains have their own storefront, admin mgmt and database. So...I have Zen-cart fully set up on both domains.

    Purchasers are still finding the old order form storefront and ordering from it.

    I use Zen-cart for students to order courses, and the moodle course management system that students use to access online courses, verifies the order on the zen-cart database before it allows a student to log-in to his/her course. I switched the moodle check to find the order in the new zen-cart database, so the student can't get into the course if he/she orders on the old order form, connected to the old database. Also the student's information enters into the old admin site.

    Is it possible to keep the old order form storefront operational but have it send the student order information to a Zen-cart database and admin site on another domain so that everything would gather in one spot and the student can be verified by the moodle?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Connect to storefront and database on a different server.

    If your database is still on the same physical server there should be no lag involved by specifying the "new" database in the "old" site's configure.php files.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Connect to storefront and database on a different server.

    One database is on abcrealestateschools.com and 1 database is on abcrealestateschool.com. I want both storefronts to send information to the admin and database on abcrealestateschool.com. So I need to tell the storefront on abcrealestateschools.com to send the orders to the admin and database on abcrealestateschool.com and not the database and admin on its server on abcrealestateschools.com.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Connect to storefront and database on a different server.

    Are they actually physically separate "servers"? Or just different domains on the "same server" hardware?

    Apart from security, the main concern is speed of database queries:
    Fastest: both databases on the same physical server
    Next fastest: both databases on servers in the same network, with proper firewall rules allowing both servers to talk to each other
    Slowest: servers on different networks

    Your hosting company should be able to set up the database firewall rules on the new server to allow only the IP address of the old server to "use" the new server's database.
    Then in your old site's configure.php files you'd put all the DB_XXXXXX credentials copied from the new server's configure.php. Admin and non-admin.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Connect to storefront and database on a different server.

    They are both hosted by siteground, but the database locations are different. So are there multiple config.php files to change?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Connect to storefront and database on a different server.

    Quote Originally Posted by abcschooldr View Post
    So are there multiple config.php files to change?
    Every Zen Cart store (at least until until v1.5.7 which is the most recent as of today) has two configure.php files: /includes/configure.php and /admin/includes/configure.php ... and both need the database details set in them.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: Connect to storefront and database on a different server.

    Quote Originally Posted by abcschooldr View Post

    Last week my zen-cart was copied to another domain because I couldn't stop google from throwing a phishing warning on my Zen-cart storefront order page.
    I really think you should spend time figuring this out, because it sounds like your site has been hacked and you haven't actually fixed the issue. (This means that sooner or later Google will be throwing phishing warnings on the new site.)
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #8
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Connect to storefront and database on a different server.

    I was never hacked. My main site is abcrealestateschool.com. I linked to abcrealestateschools.com for educational materials and the zen-cart order form. Google didn't like it that I was sending students to such a similar site to order. They are both protected and safe but they were a flag to google.

  9. #9
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Connect to storefront and database on a different server.

    Siteground responded:
    I see. I'm afraid that this is actually down to the website configuration more than the hosting configuration. If the files are saved with the same database details this means that the websites will open the information from the same database and may not show up as two separate websites. I would recommend reaching out to a professional website developer, as this is more of a development related inquiry. As a hosting provider we focus on finding and resolving hosting related issues and as such website configuration and development does fall outside of our hosting scope of support.
    I want abcrealestateschools.com to remain a usable Web site because I have students using that site for their courses, different courses for the courses on abcrealestateschool.com. I was hoping to let students use both domains to order, but have a central location for the student information to flow in to.

  10. #10
    Join Date
    Feb 2012
    Posts
    77
    Plugin Contributions
    0

    Default Re: Connect to storefront and database on a different server.

    I changed the 2 config files. Because the set-up is identical, there were only 7 url changes - including changing the location of the catalog. I had to change file permissions to change one of the config files. Because it wouldn't let me change the permission back to 444, after the change, and when I clicked on the page link, it was a Zen-cart message - I panicked and changed it back. Than I had to ask siteground to fix the permissions anyway.
    Do you think it would have worked if I had been able to change the permissions back to 444? It is possible to have multiple storefronts, all pouring into a single database and admin just by changing those 2 files to the new database location?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Can't connect to database after server move
    By hp9 in forum General Questions
    Replies: 4
    Last Post: 1 May 2017, 05:52 AM
  2. v154 crashed database, missing products on storefront and admin
    By buildingblocks in forum General Questions
    Replies: 6
    Last Post: 10 May 2016, 11:55 AM
  3. v138a Connect to database and variables in a javascript
    By carol in forum General Questions
    Replies: 9
    Last Post: 12 Jun 2013, 10:50 AM
  4. how could we connect database in new server?
    By rainmist in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 8 Feb 2010, 02:09 PM
  5. Cannot connect to to storefront from browser
    By rubicontrek in forum Installing on a Mac Server
    Replies: 12
    Last Post: 16 Jun 2006, 08:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg