Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jul 2015
    Location
    Hoofddorp
    Posts
    76
    Plugin Contributions
    0

    Default Why does localhost opens my live website ?

    Hai,

    On a certain moment my localhost environnement does not work anymore, my host file
    only says "127.0.0.1 Localhost " but the URL "localhost"opens my live website ?
    xampp Apache and SQL is running
    Does some body have an idea how this is possible ?

    regards, Cees

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,724
    Plugin Contributions
    25

    Default Re: Why does localhost opens my live website ?

    Your includes/configure.php still has references to the live site.

    For local use, make a /includes/local/configure.php with the correct local parameters.

    If you go nuts trying to make it work, install another copy of ZC locally and use the generated configure.php as a reference point for local use.
    Steve
    github.com/torvista: Apsona (php7), BackupMySQL Admin/Auto, CEON URI Mapping (php7), Image Checker, Redsys payment module, Spanish Language Pack, Structured Data

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

    Default Re: Why does localhost opens my live website ?

    Quote Originally Posted by torvista View Post
    Your includes/configure.php still has references to the live site.

    For local use, make a /includes/local/configure.php with the correct local parameters.
    Hai, torvista, this is my configure.php, can you direct my to the fault ?


    <?php
    /**
    * @package Configuration Settings circa 1.5.4
    * @copyright Copyright 2003-2014 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * File Built by zc_install on 2015-07-12 09:45:00
    */


    /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/

    // Define the webserver and path parameters
    // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
    // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
    define('HTTP_SERVER', 'http://localhost');
    define('HTTPS_SERVER', 'https://localhost');

    // Use secure webserver for checkout procedure?
    define('ENABLE_SSL', 'false');

    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
    // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');

    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_INCLUDES', 'includes/');
    define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
    define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

    define('DIR_WS_PHPBB', '/');

    // * DIR_FS_* = Filesystem directories (local/physical)
    //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
    define('DIR_FS_CATALOG', 'C:/xampp/htdocs/');

    //the following path is a COMPLETE path to the /logs/ folder eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
    define('DIR_FS_LOGS', 'C:/xampp/htdocs/logs');

    define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
    define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
    define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
    define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

    // define our database connection
    define('DB_TYPE', 'mysql');
    define('DB_PREFIX', 'usedpc');
    define('DB_CHARSET', 'utf8');
    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'root');
    define('DB_SERVER_PASSWORD', 'xampp1951');
    define('DB_DATABASE', 'usedpc');

    // The next 2 "defines" are for SQL cache support.
    // For SQL_CACHE_METHOD, you can select from: none, database, or file
    // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
    // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
    // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
    define('SQL_CACHE_METHOD', 'none');
    define('DIR_FS_SQL_CACHE', 'C:/xampp/htdocs/cache');

    // EOF

  4. #4
    Join Date
    Jul 2012
    Posts
    11,629
    Plugin Contributions
    13

    Default Re: Why does localhost opens my live website ?

    So the other question would be do you have any overrides in your includes/local directory that would define any of those constants before being loaded?
    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

  5. #5
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default Re: Why does localhost opens my live website ?

    Also, you might have added a custom .htaccess file to your server (for rewriting for prettified URLs or whatever you've added that didn't come with Zen Cart), and copied it to your local, and your local is therefore processing all the rewrites and redirects in the .htaccess which is taking you back to your live site.
    .

    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.

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

    Default Re: Why does localhost opens my live website ?

    hai,

    I have taken out some files like .htaccess, robots.txt sitemap.xml, but that didn't solve the problem, i tried
    localhost/phpmyadmin does opens my database at localhost !

    Any other suggestions where to look ?

    regards

  7. #7
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default Re: Why does localhost opens my live website ?

    Okay, now do a complete search of the contents of all your files, looking for your domain name. It shouldn't be in any of your local 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.

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

    Default Re: Why does localhost opens my live website ?

    DrByte,

    Perhaps i missunderstand you but a search on itparts.biz comes up with 65 files

  9. #9
    Join Date
    Jul 2012
    Posts
    11,629
    Plugin Contributions
    13

    Default Re: Why does localhost opens my live website ?

    Quote Originally Posted by cj.dekrijger View Post
    DrByte,

    Perhaps i missunderstand you but a search on itparts.biz comes up with 65 files
    The way Zc is written is such that the only place the server name is to appear is in the configure.php files... All other references are relative to that. Custom modifications when made ought to be written the same way. It appears that in such customizations the link(s) added/modified have been hard coded. This can be resolved typically by comparing the affected file(s) to the default ZC template/core files. Alternatively, the template could be switched to the default green template and if proper coding has been done all references will remain relative to the localhost. By proper coding meaning that the default template files remain untouched and all (majority of) modifications are made in template files using the override system.
    Last edited by mc12345678; 17 Feb 2016 at 12:24 PM. Reason: add override "discussion"
    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

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

    Default Re: Why does localhost opens my live website ?

    hai,

    I am not a php programmer and created itparts.biz without taken care off the override system,
    it's all done on trial and error and help from pro's like yourself, so i am to far into itparts.biz to
    go back to that override system. As you can see at itparts.biz it's an up and running website.
    I realy don't understand the suggestion of drbyte, as the name itparts.biz is used all along the
    website. So i am in need of a proper description where to look for to find the problem
    "why i losed my localhost development environnement"

 

 
Page 1 of 2 12 LastLast

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