Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Join Date
    Apr 2015
    Location
    Assynt, North West Highlands of Scotland
    Posts
    24
    Plugin Contributions
    0

    Default Re: No images after fresh installation

    Quote Originally Posted by mc12345678 View Post

    If by line 6 you mean:
    Code:
    define('HTTPS_SERVER', 'https://localhost');
    Yes, sorry, I was disregarding the first line of the scipt
    Code:
    /**
    The https:// part has to have it's 's' removed to make the site work at all...even as a fresh install which it is at present just using the defaults, I have not had time to add a template since upgrading the site and hitting this problem again. The site is located here

    http://www.shake-the-tree.com/shop/

    Then, I would definitely do a review of the code used on your site, because with ENABLE_SSL as false, this line/definition should not even be considered or used throughout the site. Swapping to the default ZC template should show you how the pages should be accessed (all http:), and it is likely/possible that the current template does something to always use https:...
    How do I carry out a review of the code? Is that part of the instructions at the start of this thread?

    Thanks for your continued interest. By and large https://www.eukhost.com/ have been very good over the years I have used them and, I do only pay for a shared server so perhaps this is the issue, but I am sensing that I am digging a little too deeply here for their comfort! We may need to move the E.Commerce site to another host if I cannot get to the bottom of this one :)

    James

  2. #22
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: No images after fresh installation

    Quote Originally Posted by jpirie View Post
    Yes, sorry, I was disregarding the first line of the scipt
    Code:
    /**
    The https:// part has to have it's 's' removed to make the site work at all...even as a fresh install which it is at present just using the defaults, I have not had time to add a template since upgrading the site and hitting this problem again. The site is located here

    http://www.shake-the-tree.com/shop/



    How do I carry out a review of the code? Is that part of the instructions at the start of this thread?

    Thanks for your continued interest. By and large https://www.eukhost.com/ have been very good over the years I have used them and, I do only pay for a shared server so perhaps this is the issue, but I am sensing that I am digging a little too deeply here for their comfort! We may need to move the E.Commerce site to another host if I cannot get to the bottom of this one :)

    James
    OK, so here is what I have from looking at/through the Web facing part of your store, which seems odd.

    Your base href tag which is assigned in includes/templates/responsive_classic/common/html_header.php is coming back as https:. In a default/unmodified site this is because $request_type indicates 'SSL'. The variable $request_type is assigned during the page load in includes/init_includes/init_file_db_name.php unless it is overridden (which could be the case?). It is assigned 'SSL' if any of the following conditions (between double pipe characters ||) is true.
    Code:
    ((isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == '1'))) ||
                     (isset($_SERVER['HTTP_X_FORWARDED_BY']) && strpos(strtoupper($_SERVER['HTTP_X_FORWARDED_BY']), 'SSL') !== false) ||
                     (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && (strpos(strtoupper($_SERVER['HTTP_X_FORWARDED_HOST']), 'SSL') !== false || strpos(strtolower($_SERVER['HTTP_X_FORWARDED_HOST']), str_replace('https://', '', HTTPS_SERVER)) !== false)) ||
                     (isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && strpos(strtolower($_SERVER['HTTP_X_FORWARDED_SERVER']), str_replace('https://', '', HTTPS_SERVER)) !== false) ||
                     (isset($_SERVER['SCRIPT_URI']) && strtolower(substr($_SERVER['SCRIPT_URI'], 0, 6)) == 'https:') ||
                     (isset($_SERVER['HTTP_X_FORWARDED_SSL']) && ($_SERVER['HTTP_X_FORWARDED_SSL'] == '1' || strtolower($_SERVER['HTTP_X_FORWARDED_SSL']) == 'on')) ||
                     (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && (strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'ssl' || strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')) ||
                     (isset($_SERVER['HTTP_SSLSESSIONID']) && $_SERVER['HTTP_SSLSESSIONID'] != '') ||
                     (isset($_SERVER['HTTP_X_FORWARDED_PORT']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == '443') ||
                     (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443')
    As can be seen, these are server side "settings", so if any of these are incorrectly set to return true, then that can be an issue and likely explains what is observed.

    To correct your issue, which does appear to be server related you could modify includes/templates/YOUR_TEMPLATE/common/html_header.php to account for you not enabling SSL, and that should resolve the issue for website visitors, but doesn't solve the underlying problem which is the server's configuration. The way the default ZC template is setup and installation check(s) are setup help to identify this issue, but if it can't be corrected, yes would suggest a change in hosting arrangement. Thing is, if they can't setup their shared server correctly, what's to say that they could setup a "hosted" or dedicated server correctly?

    The change needed in html_header would be to modify:
    Code:
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
    To:
    Code:
    <base href="<?php echo (($request_type == 'SSL' && ENABLE_SSL == 'true') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #23
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: No images after fresh installation

    Quote Originally Posted by jpirie View Post
    Yes, sorry, I was disregarding the first line of the scipt
    Code:
    /**
    The https:// part has to have it's 's' removed to make the site work at all...even as a fresh install which it is at present just using the defaults, I have not had time to add a template since upgrading the site and hitting this problem again. The site is located here

    http://www.shake-the-tree.com/shop/



    How do I carry out a review of the code? Is that part of the instructions at the start of this thread?

    Thanks for your continued interest. By and large https://www.eukhost.com/ have been very good over the years I have used them and, I do only pay for a shared server so perhaps this is the issue, but I am sensing that I am digging a little too deeply here for their comfort! We may need to move the E.Commerce site to another host if I cannot get to the bottom of this one :)

    James
    Looking back at the support offered by lhungil, it would appear that "code" that could be reviewed to identify the server "configuration" issue, would be basically at the end of the phpinfo() results where the _SERVER related data is/would be provided... That information could be reviewed to identify which "factor" is triggering $request_type to be set as 'SSL' for all links. Whichever piece of information it is that is evaluating to true, could be modified to also coincide with the use of ENABLE_SSL such that if ENABLE_SSL were false, then that particular "answer" would/could be considered false as well...

    Otherwise, the code review to which I was speaking (not exactly applicable if using a default file installation of ZC code) was like what I did in finding html_header.php and init_file_db_name.php as sources for the observed condition. "Easiest" way to find modifications to such code is to use some sort of code compare utility, though in the absence of that, I have found that I can work around file comparisons by using standard "desktop" software such as Word where it is possible to compare two documents. But, having said that, I do not suggest copying from Word to your web-page as it adds additional "formatting" characters that tend to scramble how things look. Just to use it as the tool that is needed. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #24
    Join Date
    Apr 2015
    Location
    Assynt, North West Highlands of Scotland
    Posts
    24
    Plugin Contributions
    0

    Default Re: No images after fresh installation

    Hey
    mc12345678.. Your Private Message box is full :)

    Better do some reading ;)

    James

  5. #25
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: No images after fresh installation

    Quote Originally Posted by jpirie View Post
    Hey
    mc12345678.. Your Private Message box is full :)

    Better do some reading ;)

    James
    Yeah saw that earlier. Have items saved for various reasons. Made a small amount of room. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Cannot create customer account even after fresh installation
    By Karts in forum Managing Customers and Orders
    Replies: 1
    Last Post: 24 Aug 2011, 10:31 AM
  2. Some images not found after transfer from local server to host server
    By simon1066 in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 1 Apr 2009, 02:48 PM
  3. Secure Server Cert after installation
    By kdgjevre in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 26 Apr 2007, 12:28 AM
  4. After fresh installation getting this error
    By prabhu.chinnee in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 4 Jul 2006, 07:37 AM
  5. Problem after fresh installation ion IIS6
    By thommy in forum Installing on a Windows Server
    Replies: 7
    Last Post: 6 Jun 2006, 11:08 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