Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    785
    Plugin Contributions
    7

    Idea or Suggestion PHP Warning: Empty delimiter. in Server Error Log

    I was doing some dead link testing on a site today and got this error.

    [Mon Jun 15 16:27:14 2009] [error] PHP Warning: strstr() [<a href='function.strstr'>function.strstr</a>]: Empty delimiter. in /includes/functions/functions_general.php on line 996

    The call is to Set back button function zen_back_link().

    I just can not get my head around how it's screwing up the array.

    I have never seen this error before.

    Zen Cart 1.38a, with all patches, zj_silver template

    I don't think in normal operation that this error ever comes up.

    Any ideas?

    Skip
    • 446F63746F722057686F •

  2. #2
    Join Date
    Apr 2008
    Location
    Missoula, MT
    Posts
    59
    Plugin Contributions
    0

    Default Re: PHP Warning: Empty delimiter. in Server Error Log

    Code:
      function zen_back_link() {
        if (sizeof($_SESSION['navigation']->path)-2 > 0) {
          $back = sizeof($_SESSION['navigation']->path)-2;
          $link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
        } else {
          if (isset($_SERVER['HTTP_REFERER']) && strstr(HTTP_SERVER, $_SERVER['HTTP_REFERER'])) {
            $link= $_SERVER['HTTP_REFERER'];
          } else {
            $link = '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">';
          }
          $_SESSION['navigation'] = new navigationHistory;
        }
        return $link;
      }
    looks like there is only one call to the strstr function there...only one thing i can imagine would be if the $_SERVER['HTTP_REFERER'] had a comma in it...strstr has two parameters + 1 optional.
    http://us.php.net/manual/en/function.strstr.php

    that last parameter is called before_needle, but acts much like a delimiter. I don't have an intimate knowledge of how PHP processes though...so I am not sure if that is really possible. But it IS a strange issue, i've never seen it before. Have you discovered anything else?

  3. #3
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    785
    Plugin Contributions
    7

    Default Re: PHP Warning: Empty delimiter. in Server Error Log

    Thanks for the info.

    The only thing that I have seen here and on the web is that it comes from a bad rewrite rule feed to the cart.
    I guess adding some sanitizing to the string would fix it but the issue is not that high on list right now.

    Skip
    • 446F63746F722057686F •

  4. #4
    Join Date
    Apr 2008
    Location
    Missoula, MT
    Posts
    59
    Plugin Contributions
    0

    Default Re: PHP Warning: Empty delimiter. in Server Error Log

    yeah sanitizing == smooth operashunz

  5. #5
    Join Date
    Feb 2008
    Posts
    60
    Plugin Contributions
    0

    Default Re: PHP Warning: Empty delimiter. in Server Error Log

    Quote Originally Posted by skipwater View Post
    Thanks for the info.

    The only thing that I have seen here and on the web is that it comes from a bad rewrite rule feed to the cart.
    I guess adding some sanitizing to the string would fix it but the issue is not that high on list right now.

    Skip
    Got the same errors msg in my log today?

    PHP Warning: strstr(): Empty delimiter. in /home/content/d/y/t/xxx/html/includes/functions/functions_general.php on line 996
    PHP Code:
      if (isset($_SERVER['HTTP_REFERER']) && strstr(HTTP_SERVER$_SERVER['HTTP_REFERER'])) 
    Have not modified this file "functions_general.php" but did just install the Query Cache mod dont know if that has anything to add to this error or not?

  6. #6
    Join Date
    Nov 2007
    Posts
    10
    Plugin Contributions
    1

    Default Re: PHP Warning: Empty delimiter. in Server Error Log

    I am having the same problem. It seems to have come up after some trojans were added to our site from a hack.

    Is this the case with anyone else? Anyone found a fix?

    Thanks, Bill

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP Warning: Empty delimiter. in Server Error Log

    .

    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. v139h PHP Warning: strstr() Empty delimiter HELP
    By Enpeek in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 Apr 2012, 09:43 AM
  2. v139h PHP Warning: strstr() Empty delimiter HELP
    By Enpeek in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Apr 2012, 02:21 AM
  3. Warning notice at top of admin: empty delimiter. in .../easypopulate_functions.php
    By hitechcomputerdesign in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 26 Oct 2009, 06:39 PM
  4. Warning: strpos Empty Delimiter
    By OJM in forum Installing on a Windows Server
    Replies: 2
    Last Post: 12 Nov 2007, 09:18 PM
  5. PHP Warning: Empty Delimiter
    By ioancuza in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 9 Dec 2006, 04:47 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