Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,724
    Plugin Contributions
    25

    Default Re: Why does localhost opens my live website ?

    To clarify what has been said.
    Your website knows exactly where it is by what is defined in the configure.php files.
    This is the ONLY place where the actual REAL name of the website www.whatever.com may be used in the entire ZC fileset.

    NOWHERE else in the entire site should have the REAL address written in the code: it should use the constant that this address is assigned to: HTTP_SERVER or HTTPS_SERVER
    and any reference to other files in the filesystem should use a combination of the CONSTANTS defined in configure.php to get there, never the actual paths.
    If you don't do this, you get all the problems you are experiencing now where the site is not portable.

    This is another example of why (I believe) one should develop locally, you would have found and solved this issue years ago when you first moved it online.
    Steve
    github.com/torvista: Apsona (php7), BackupMySQL Admin/Auto, CEON URI Mapping (php7), Image Checker, Redsys payment module, Spanish Language Pack, Structured Data

  2. #12
    Join Date
    Jul 2012
    Posts
    11,627
    Plugin Contributions
    13

    Default Re: Why does localhost opens my live website ?

    Tools to help you "find" the problem and then possibly post the area of code so that you can be provided some direct guidance on how to fix your issue unless you choose to invest in someone directly supporting the "repair".

    In your admin, goto tools->Developers Toolkit.

    Suggestion is to use the lower row, though there are other rows like the templates row that ought to provide desired results.

    Anyways, if you use the lower row, then in the first block, type in the base of the site's url (exclude http:// or https:// portion), for now select in the dropdown catalog, then on the right side click the button. After some processing time, the results should appear at the top of the screen. Any file that is not includes/configure.php, in the includes/local/ directory, admin/includes/configure.php, or in the admin/includes/local/ directory is suspect to have been hard coded (using the url directly) rather than as torvista described using a portable method of coding. Portable meaning that it is easy to move/copy a site from one location to another and everything to still work after a small modification in "one" place (store side and then admin side).

    more than likely the changes will all be in a folder related to your current (or past) template files. If not then that bridge can be crossed when it comes, but if they are not in the template folder for your specific template, the next upgrade may become a bit challenging...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #13
    Join Date
    Jul 2015
    Location
    Hoofddorp
    Posts
    76
    Plugin Contributions
    0

    Default Re: Why does localhost opens my live website ?

    Hai @ torvista, mc12345678 and DrByte,

    I have managed to get my localhost environnement working again, i took me an hour of 7
    but it works!
    I have taken a backup from 2 months ago and the database from the same date!
    Checked that all the directory's are there with the right files in it, that does it.
    After that here and there changed some files to get the same version as the live site,
    Database from the live site copied , its all working again.
    Perhaps that i come into little differences but oke !

    Thanks for your time and suggestions,

    regards, Cees

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Problem! why does all my links opens up in new windows?
    By letimorlin in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Dec 2011, 09:34 AM
  2. moving from localhost to live
    By yamadan in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 9 Feb 2010, 07:37 AM
  3. copying from localhost to live site?
    By bigblue in forum General Questions
    Replies: 2
    Last Post: 17 Nov 2009, 08:25 PM
  4. Why does my website run slowly?
    By ttmb33 in forum Customization from the Admin
    Replies: 1
    Last Post: 19 Aug 2009, 12:08 AM
  5. localhost to live copy
    By daveky in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 5 Sep 2006, 02:13 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR