Results 1 to 10 of 2445

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lankeeyankee View Post
    what's on /includes/functions/functions_general.php on line 1031?
    1031 to 1038

    Code:
    if (isset($_SERVER['HTTP_REFERER']) && preg_match("~^".HTTP_SERVER."~i", $_SERVER['HTTP_REFERER']) ) {
          //if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], str_replace(array('http://', 'https://'), '', HTTP_SERVER) ) ) {
            $link= $_SERVER['HTTP_REFERER'];
          } else {
            $link = zen_href_link(FILENAME_DEFAULT);
          }
          $_SESSION['navigation'] = new navigationHistory;
        }
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

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

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by Nick1973 View Post
    1031 to 1038

    Code:
    if (isset($_SERVER['HTTP_REFERER']) && preg_match("~^".HTTP_SERVER."~i", $_SERVER['HTTP_REFERER']) ) {
          //if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], str_replace(array('http://', 'https://'), '', HTTP_SERVER) ) ) {
            $link= $_SERVER['HTTP_REFERER'];
          } else {
            $link = zen_href_link(FILENAME_DEFAULT);
          }
          $_SESSION['navigation'] = new navigationHistory;
        }
    Is this store hosted on a Windows machine? Does the HTTP_SERVER value found in includes/configure.php use a backslash (\) instead of a forwards slash (/) to identify a sub-directory for the store?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Ceon URI Mapping v4.x

    Quote Originally Posted by mc12345678 View Post
    Is this store hosted on a Windows machine? Does the HTTP_SERVER value found in includes/configure.php use a backslash (\) instead of a forwards slash (/) to identify a sub-directory for the store?
    It's on a Linux Server however the domain name is not live and uses something like http://00.00.00.000/~MYWEBSITE to get to it
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  4. #4
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by Nick1973 View Post
    It's on a Linux Server however the domain name is not live and uses something like http://00.00.00.000/~MYWEBSITE to get to it
    And somewhere in ~MYWEBSITE is there a v? Possibly just after the tilde?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by mc12345678 View Post
    And somewhere in ~MYWEBSITE is there a v? Possibly just after the tilde?
    No there isn't
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  6. #6
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by Nick1973 View Post
    No there isn't
    Because of the use of the tilde in the HTTP_SERVER string, recommend modifying:
    Code:
    if (isset($_SERVER['HTTP_REFERER']) && preg_match("~^".HTTP_SERVER."~i", $_SERVER['HTTP_REFERER']) ) {       //if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], str_replace(array('http://', 'https://'), '', HTTP_SERVER) ) ) {         $link= $_SERVER['HTTP_REFERER'];       } else {         $link = zen_href_link(FILENAME_DEFAULT);       }       $_SESSION['navigation'] = new navigationHistory;     }
    To:
    Code:
    if (isset($_SERVER['HTTP_REFERER']) && preg_match("~^".preg_quote(HTTP_SERVER, "~")."~i", $_SERVER['HTTP_REFERER']) ) {       //if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], str_replace(array('http://', 'https://'), '', HTTP_SERVER) ) ) {         $link= $_SERVER['HTTP_REFERER'];       } else {         $link = zen_href_link(FILENAME_DEFAULT);       }       $_SESSION['navigation'] = new navigationHistory;     }
    I don't see any other instance on the catalog side where this style of preg_match is used against that specific string. I didn't look on the admin side. Note, that based on the error log that the page to be loaded was a page not found page. Why that particular direction was chosen I do not know based on what has been provided or what has been performed to generate URIs, but the above would prevent running into a clash. An alternative to adding in the preg_quote function is to modify the two uses of the tilde to say a non-uri like character, perhaps a semi-colon (;) or some other "odd" character.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by mc12345678 View Post
    Because of the use of the tilde in the HTTP_SERVER string, recommend modifying:
    Code:
    if (isset($_SERVER['HTTP_REFERER']) && preg_match("~^".HTTP_SERVER."~i", $_SERVER['HTTP_REFERER']) ) {       //if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], str_replace(array('http://', 'https://'), '', HTTP_SERVER) ) ) {         $link= $_SERVER['HTTP_REFERER'];       } else {         $link = zen_href_link(FILENAME_DEFAULT);       }       $_SESSION['navigation'] = new navigationHistory;     }
    To:
    Code:
    if (isset($_SERVER['HTTP_REFERER']) && preg_match("~^".preg_quote(HTTP_SERVER, "~")."~i", $_SERVER['HTTP_REFERER']) ) {       //if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], str_replace(array('http://', 'https://'), '', HTTP_SERVER) ) ) {         $link= $_SERVER['HTTP_REFERER'];       } else {         $link = zen_href_link(FILENAME_DEFAULT);       }       $_SESSION['navigation'] = new navigationHistory;     }
    I don't see any other instance on the catalog side where this style of preg_match is used against that specific string. I didn't look on the admin side. Note, that based on the error log that the page to be loaded was a page not found page. Why that particular direction was chosen I do not know based on what has been provided or what has been performed to generate URIs, but the above would prevent running into a clash. An alternative to adding in the preg_quote function is to modify the two uses of the tilde to say a non-uri like character, perhaps a semi-colon (;) or some other "odd" character.
    I neglected to also state that the specific error encountered in includes/functions/functions_general.php when trying whatever uri on the store was attempted is not directly associated with this plugin as it would have occurred regardless of being installed or not. The cause of getting a page not found error may have been a result of some aspect of its installation (possibly incomplete), incorrect use, or other some other factor, but there has not been sufficient information provided to identify why a page not found response was provided.

    Generally speaking when using Zen Cart, it is expected that the uri to the store would be a "full" uri, not one using an ip address/temp folder. There are other threads in the forum where this is discussed and it is not necessarily associated with this plugin. I encourage seeking assistance with this aspect in either an existing thread directly related to the issue or by beginning a new one. Note that while this forum contains a lot of useful information that there are many Internet search tools outside of it that may find related discussions better than the forum's search tool. The recent recommendation of others is to add Zen Cart to the end of any such search.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  2. CEON URI Mapping
    By jmkent in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 22 Nov 2012, 04:28 PM
  3. Ceon URI Mapping (SEO)
    By conor in forum All Other Contributions/Addons
    Replies: 2906
    Last Post: 9 Sep 2011, 08:31 AM
  4. Ceon URI Mapping v4
    By conor in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 14 Aug 2011, 02:51 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