Forums / General Questions / Empty delimiter error

Empty delimiter error

Locked

Started by timbaloo on 26 Jan 2007, 4:46 PM · Views: 1,526

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
26 Jan 2007, 4:46 PM
#1
timbaloo avatar

timbaloo

New Zenner

Join Date:
Aug 2006
Posts:
18
Plugin Contributions:
0

Empty delimiter error

Hello Zenners,

First, I hope that is the right place to ask this question...

But I am dealing with an error message on my zen site. It's not systematic but occurs frequently :

Warning: strstr() [function.strstr]: Empty delimiter. in /home/WwwBSD/sapapaya.com/includes/functions/functions_general.php on line 983

I found this is about the HTTP referer and i guess this must be linked with buttons (maybe CSS buttons) but I cannot find a way to resolve it. (I know that I'm limited in PHP coding ...)

Has anyone experienced this matter or any idea to get it work fine.

Thanks a lot in advance
:D

26 Jan 2007, 6:35 PM
#2
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Empty delimiter error

As you probably know, $_SESSION is a predefined variable, which means PHP always takes care of the values set therein. The following comes from the PHP manual describing the specific variable $_SERVER['HTTP_REFERER']...

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
Quote originally found on this page. Obviously it's an issue with your browser, but does raise a good concern, namely should we not trust this variable. My gut says no, most main line browsers have no problem providing this information. However, an error condition might be worth considering.

Frank Koehl
"Cleverly Disguised as a Responsible Adult"

frankkoehl.com

27 Jan 2007, 1:18 AM
#3
timbaloo avatar

timbaloo

New Zenner

Join Date:
Aug 2006
Posts:
18
Plugin Contributions:
0

Re: Empty delimiter error

Hi BlindSide,

Thanks a lot for the explanations & the link.

The problem is that i had this error message with 3 different browsers (FF 1.5, IE 6 and Opera 9.1) ...

So I guess there might be something else. I noticed that the error often occurs with pages such as "Members cart" (when returning) or EZ pages.

Maybe there is a connection ?

27 Jan 2007, 11:49 AM
#4
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Empty delimiter error

What version you use?
replace this

if (strstr(HTTP_SERVER, $_SERVER['HTTP_REFERER'])) {

by

if (isset($_SERVER['HTTP_REFERER']) && strstr(HTTP_SERVER, $_SERVER['HTTP_REFERER'])) {

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

27 Jan 2007, 3:51 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Empty delimiter error

Andrew's right -- that's the fix.
You're using an old version of Zen Cart -- the current version has this fix in it already.

.
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.

28 Jan 2007, 11:21 PM
#6
timbaloo avatar

timbaloo

New Zenner

Join Date:
Aug 2006
Posts:
18
Plugin Contributions:
0

Re: Empty delimiter error

Hello guys,

I am on v. 1.3.0.2.

Thanks for the fix, but I replaced the code and I am still having the same message when i am returning to my member's cart.

(If you wanna have a look, here is a test account: [email protected] / 123456. after logging, go to the shopping cart).

Any idea ?

Thx in advance