Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Sep 2012
    Posts
    31
    Plugin Contributions
    0

    Default Problem after migrating hosts

    Hi all!

    I recently migrated my zencart shop to a new host (from godaddy to hostgator if it matters)

    I have an issue where the main page is showing alright, but the product pages have their internal links to the stylesheets and images all wrong.

    For example, on page http://anysigns.ca/imovies-shows-com...al-p-1563.html

    <link rel="stylesheet" type="text/css" href="includes/templates/mobishop_blue/css/stylesheet.css" />

    Would actually lead to http://anysigns.ca/imovies-shows-com...gxconveyor.css
    The correct path is http://anysigns.ca/includes/template...gxconveyor.css.

    If I change the code via the inspect element feature to be

    <link rel="stylesheet" type="text/css" href="../includes/templates/mobishop_blue/css/stylesheet.css" />

    Then it links to the correct path, and it shows the correct styles and images.

    In the configure.php file I tried changing
    define('DIR_WS_INCLUDES', 'includes/');
    to
    define('DIR_WS_INCLUDES', '../includes/');

    But that just results in a completely empty page. How should I go about this issue? Many thanks in advance.

    Website URL: anysigns.ca
    Zen Cart version 1.5.0

  2. #2
    Join Date
    Jul 2012
    Posts
    15,334
    Plugin Contributions
    17

    Default Re: Problem after migrating hosts

    Without looking at the webpage, it appears that the base tag is either incorrect in or missing from the header area of the template: <base href="">

    The link information in the href="" portion should point to the web facing portion of the web-address.

    Although this is an ancient, basically unsupported version of ZC, the file: includes/templates/YOUR_TEMPLATE/common/html_header.php
    should have the following in it:

    Code:
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
    Where YOUR_TEMPLATE is mobishop_blue.
    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. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    9,848
    Plugin Contributions
    74

    Default Re: Problem after migrating hosts

    @anysigns, since you've changed hosts, it's likely that your DIR_FS_CATALOG setting (present in both the /admin/includes/configure.php and /includes/configure.php) requires update.

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    7,637
    Plugin Contributions
    8

    Default Re: Problem after migrating hosts

    As lat9 says, take a look at the configure.php files.

    Particularly the includes/configure.php

    From what I see, one of the settings is missing the ending "/"
    Did you read the posting tips?!?
    Responsive Color Changes for 155-156c demo here.
    Zen Cart PCI Compatible Hosting

  5. #5
    Join Date
    Sep 2012
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem after migrating hosts

    Quote Originally Posted by mc12345678 View Post
    Without looking at the webpage, it appears that the base tag is either incorrect in or missing from the header area of the template: <base href="">

    The link information in the href="" portion should point to the web facing portion of the web-address.

    Although this is an ancient, basically unsupported version of ZC, the file: includes/templates/YOUR_TEMPLATE/common/html_header.php
    should have the following in it:

    Code:
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
    Where YOUR_TEMPLATE is mobishop_blue.
    There isn't an html_header file in there. Only tpl_header, but as far as I can tell, it's for the header referring to the position on the page, not the <head></head> tags, where the base tag would be appropriate

  6. #6
    Join Date
    Sep 2012
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem after migrating hosts

    Quote Originally Posted by dbltoe View Post
    As lat9 says, take a look at the configure.php files.

    Particularly the includes/configure.php

    From what I see, one of the settings is missing the ending "/"
    From what I can see, only the line define('DIR_FS_SQL_CACHE', '/home/content/80/5493880/html/cache'); is missing an ending "/"

    Here are the contents of the includes/configure.php file (the FS DIR is set correctly I think)

    PHP Code:
    // 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://anysigns.ca');
      
    define('HTTPS_SERVER''https://anysigns.ca');

      
    // 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''/home3/anysigns/public_html/');

      
    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''zen_');
      
    define('DB_CHARSET''latin1');
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''username:)');
      
    define('DB_SERVER_PASSWORD''password:)');
      
    define('DB_DATABASE''anysigns_anysign');

      
    // 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''/home/content/80/5493880/html/cache'); 

  7. #7
    Join Date
    Jul 2012
    Posts
    15,334
    Plugin Contributions
    17

    Default Re: Problem after migrating hosts

    Quote Originally Posted by anysigns View Post
    There isn't an html_header file in there. Only tpl_header, but as far as I can tell, it's for the header referring to the position on the page, not the <head></head> tags, where the base tag would be appropriate
    If that's true that the mobishop blue folder didn't contain an html_header.php file, then something modified your includes/templates/template_default/common/html_header.php to not match a normal ZC install.

    Looking at the includes/configure.php and having (after others had posted about the missing /) looked further at the page content, what uri rewriter are you using and is it properly installed for this version of ZC? It seems like it may be removing the "extra" slash (or rather that it is not incorporating DIR_WS_CATALOG sufficiently).
    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

  8. #8
    Join Date
    Jan 2004
    Posts
    65,671
    Blog Entries
    7
    Plugin Contributions
    244

    Default Re: Problem after migrating hosts

    While this isn't going to relate to your css files, the DIR_FS_SQL_CACHE looks completely wrong. Usually it points to the same as DIR_FS_CATALOG with '/cache' added to it. What you posted looks like it came from the old server.
    .

    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.

  9. #9
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    3,778
    Plugin Contributions
    60

    Default Re: Problem after migrating hosts

    Check that these items in all of your paths in both configure files are correct for the new server

    /home3/anysigns/, it might be just home instead of home3 for example.

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  10. #10
    Join Date
    Sep 2012
    Posts
    31
    Plugin Contributions
    0

    Default Re: Problem after migrating hosts

    Quote Originally Posted by mc12345678 View Post
    If that's true that the mobishop blue folder didn't contain an html_header.php file, then something modified your includes/templates/template_default/common/html_header.php to not match a normal ZC install.

    Looking at the includes/configure.php and having (after others had posted about the missing /) looked further at the page content, what uri rewriter are you using and is it properly installed for this version of ZC? It seems like it may be removing the "extra" slash (or rather that it is not incorporating DIR_WS_CATALOG sufficiently).
    That's the one.

    I have Ultimate URLs v2.215. When I disable it, the website works perfectly.

    I think the reason is because it uses directories/slashes to create readable urls

    like this one
    http://anysigns.ca/isigns-funny-joke...er-p-1204.html


    and without the Ultimare URLs, it looks like this
    http://anysigns.ca/index.php?main_pa...oducts_id=1204

    the "/isigns-funny-joke-prank-c-44/" is the part that is tripping it up, since it searches for the css files in public_html/isigns-funny-joke-prank-c-44/includes/.. etc.

    Not sure if the issue is with the module, or if there is something in the config files that is messing it up. I'm glad to have my store back, but I'd prefer to have readable URLs for search engine visibility's sake

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h 404 error after migrating
    By darkusblack in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 15 Jun 2015, 03:22 AM
  2. v139h Email problem after changing hosts
    By dbjsi83474 in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 5 May 2012, 04:48 AM
  3. sessions error after changing hosts
    By delia in forum General Questions
    Replies: 6
    Last Post: 29 Jul 2011, 08:47 PM
  4. White Pages after migrating
    By blackwolf in forum General Questions
    Replies: 4
    Last Post: 2 Aug 2010, 02:11 AM
  5. URL problems after changing hosts
    By richmwi in forum General Questions
    Replies: 2
    Last Post: 9 Oct 2009, 02:18 AM

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