Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2010
    Location
    UK
    Posts
    23
    Plugin Contributions
    0

    Default Issues with my Test Site

    Have set up a test site (in a subfolder: domain.com/testsite/zen-cart) in preparation for doing an upgrade. The test site homepage is different to the live site as you would expect and clicking on a link in the sidebar remains on the test site. However clicking on the subcategories and header/footer links takes you to the live site rather than the test site version of that page. I hope that makes sense. The test site version of admin seems to be working fine.

    Obviously there is something I have not done and no doubt it's something very simple - what have I missed? Also is there a way to force all links (even those within page text) to go to the test site or does each individual link have to be changed manually?

    Also (don't know if this is connected) after clicking on a few links from the test site homepage I got the following errors:

    Warning: Variable passed to each() is not an array or object in /public_html/testsite/zen-cart/includes/classes/db/mysql/query_factory.php on line 114

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /public_html/testsite/zen-cart/includes/classes/db/mysql/query_factory.php:114) in /public_html/testsite/zen-cart/includes/functions/sessions.php on line 108

    Warning: Cannot modify header information - headers already sent by (output started at /public_html/testsite/zen-cart/includes/classes/db/mysql/query_factory.php:114) in /public_html/testsite/zen-cart/includes/init_includes/init_templates.php on line 78

    On other pages I am also getting:

    Warning: Cannot modify header information - headers already sent by (output started at /public_html/testsite/zen-cart/includes/classes/db/mysql/query_factory.php:114) in /public_html/testsite/zen-cart/includes/classes/seo.url.php on line 1246

    Warning: Cannot modify header information - headers already sent by (output started at /public_html/testsite/zen-cart/includes/classes/db/mysql/query_factory.php:114) in /public_html/testsite/zen-cart/includes/classes/seo.url.php on line 1247

    I'm afraid I'm a bit lost so any help welcome.

    Thank you!

  2. #2
    Join Date
    Sep 2010
    Location
    UK
    Posts
    23
    Plugin Contributions
    0

    Default Re: Issues with Test Site

    Right after lots of fiddling the error messages seem to have gone (for now) but I still have the problem of not being able to stay on the test site - if I click on sidebar link from the homepage, although that page has the testsite url, all links on the page go to the live site.

    I've also changed the site logo to one that is obviously the test site to avoid confusion later however that is only showing on the homepage. All other pages (even those with test site url) have the live site logo.

    Help!

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

    Default Re: Issues with Test Site

    Sounds like the URLs in your HTTP_SERVER and/or HTTPS_SERVER settings of your /includes/configure.php file are pointing to the wrong place.

    When setting up a test site, you should run zc_install to create the configure.php contents. And, then if you choose to copy any files from your other site over, DO NOT REPLACE the configure.php files, because they are site/folder/database specific.
    .

    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.

  4. #4
    Join Date
    Sep 2010
    Location
    UK
    Posts
    23
    Plugin Contributions
    0

    Default Re: Issues with my Test Site

    Thank you DrByte. I did run zc_install, and all other files are a copy of the live site. I've changed something in .htaccess and it seems to be working now.

    The site has a LOT of links within page text (plus header/footer links) and obviously these links point to the live site - is there a quick way of solving this or does each link have to be changed manually I'm hoping not the latter as that will be a very long job!

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

    Default Re: Issues with my Test Site

    All the URLs that Zen Cart builds from its built-in features are "relative" URLs, assembled in conjunction with the domain name specified in your configure.php files.

    But if you hard-coded absolute URLs into your template or other files when you designed your site, then you'll have to manually change them all if you want them to point someplace else.

    Also, if you have "rewrite" rules added to your .htaccess files, you should disable those in your test site else they'll interfere with normal operation.
    .

    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
    Sep 2010
    Location
    UK
    Posts
    23
    Plugin Contributions
    0

    Default Re: Issues with my Test Site

    Quote Originally Posted by DrByte View Post
    All the URLs that Zen Cart builds from its built-in features are "relative" URLs, assembled in conjunction with the domain name specified in your configure.php files.

    But if you hard-coded absolute URLs into your template or other files when you designed your site, then you'll have to manually change them all if you want them to point someplace else.
    I suspected that was the case. Oh well...


    Quote Originally Posted by DrByte View Post
    Also, if you have "rewrite" rules added to your .htaccess files, you should disable those in your test site else they'll interfere with normal operation.
    Is that all rewrite rules? I've got:

    Code:
    RewriteEngine On
    RewriteBase /testsite/zen-cart/
    
    RewriteCond %{QUERY_STRING} currency=EUR$ [NC]
    RewriteRule ^(.*)$ http://www.domain.co.uk/zen-cart/$1? [R=301,L]
    
    RewriteCond %{HTTP_HOST} !^www.domain.co.uk$ [NC]
    RewriteRule ^(.*)$ http://www.domain.co.uk/zen-cart/$1 [R=301,L]
    Plus a load of manual redirects of old defunct urls which I understand can be deleted. Also the rewrites for SEO URLs.

    Do they all need to go?

    Thank you.

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

    Default Re: Issues with my Test Site

    If they're causing you problems, then remove 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.

 

 

Similar Threads

  1. v150 Setting up a Test Site Environment via Wamp (with an existing ZenCart site)
    By RobertH in forum Installing on a Windows Server
    Replies: 15
    Last Post: 23 Sep 2015, 02:01 AM
  2. New test installation issues with Existing template
    By icecold in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 29 Oct 2011, 04:11 AM
  3. Replies: 10
    Last Post: 4 Mar 2011, 01:05 AM
  4. Issues with test site and Wamp
    By mw4kids in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 30 Mar 2009, 02:31 PM
  5. Problem Moving Test Site - Switches to test site folder
    By bullseye in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 1 Jan 2008, 10:47 PM

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