Zen Cart Logo
Forums / Installing on a Linux/Unix Server / HELP! Big problems

HELP! Big problems

Locked

Views: 4,492

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
22 Jan 2007, 4:25 PM
#1
wakenine avatar

wakenine

New Zenner

Join Date:
Nov 2006
Posts:
26
Plugin Contributions:
0

HELP! Big problems

On 2 of the sites I have recently done using ZC, I am getting big time problems, and they seem to be sporadic. Go to https://www.veggiegourmet.com and browse around a bit to see what I am talking about. I keep getting this error at the top of the pages:

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

22 Jan 2007, 4:26 PM
#2
wakenine avatar

wakenine

New Zenner

Join Date:
Nov 2006
Posts:
26
Plugin Contributions:
0

Re: HELP! Big problems

Actually, it gives me this at the top of pages:

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1241

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1242

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1243

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1244

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1247

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1248

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1250

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1241

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1242

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1243

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1244

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1247

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1248

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1250

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1241

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1242

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1243

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1244

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1247

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1248

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1250

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1241

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1242

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1243

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1244

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1247

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1248

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1250

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1241

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1242

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1243

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1244

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1247

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1248

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1250

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1241

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1242

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1243

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1244

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1247

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1248

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1250

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1240

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1241

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1242

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1243

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1244

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1247

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1248

Warning: mb_strstr() [function.mb-strstr]: Empty haystack in /home/vegggoo7/public_html/cart/includes/functions/functions_general.php on line 1250

Warning: Cannot modify header information - headers already sent by (output started at /home/vegggoo7/public_html/cart/includes/functions/functions_general.php:1240) in /home/vegggoo7/public_html/cart/includes/init_includes/init_templates.php on line 78

22 Jan 2007, 5:52 PM
#3
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: HELP! Big problems

I looked at every page on your site and didn't have a problem. It did make me hungry, tho! :D

22 Jan 2007, 8:11 PM
#4
dbrewster avatar

dbrewster

Zen Follower

Join Date:
Jul 2005
Location:
Charlottesville, VA
Posts:
376
Plugin Contributions:
0

Re: HELP! Big problems

I got an "unable to connect" error message.

---Diana

22 Jan 2007, 9:11 PM
#5
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: HELP! Big problems

dbrewster:

I got an "unable to connect" error message.

---Diana

I think the server hiccupped. I got a 404 error, but the site came up when I tried again.

22 Jan 2007, 9:41 PM
#6
wakenine avatar

wakenine

New Zenner

Join Date:
Nov 2006
Posts:
26
Plugin Contributions:
0

Re: HELP! Big problems

It does seem to be sporadic on both of the sites. The other site is https://www.honeycreekfarms.com and it does the exact same thing. Perhaps it is a server issue, as they are both hosted with the same company and shared server.

Does this mean that it is trying to connect to the server and respective SQL database, but fails occasionally?

22 Jan 2007, 10:58 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,811
Plugin Contributions:
15

Re: HELP! Big problems

I don't get the problem on either site but I would add> .listingDescription {

text-align: justify;
}to the stylesheet.css. Makes the product pages match throughout the Honey Creek site.

You also have several css errors on the Honey Creek main page. Five dealing with background images and two with the background color. There is no font-color selector.

22 May 2007, 8:55 AM
#8
kmh avatar

kmh

New Zenner

Join Date:
May 2007
Location:
Sydney, Australia
Posts:
25
Plugin Contributions:
0

Re: HELP! Big problems

I too have today generated this error message / warning.
I have been going ok following posts until now...

Today, I was uploading images and thought I understood the protocol but perhaps I should have been using some underscores where I hadn't. anyway, somewhere in all of this, i suddenly generated:

Warning: mb_strstr()

on http://www.animalvegetablemineral.net.au/shop/
i then deleted all of the photos uploaded - no luck
i then deleted all of the images files i had played with - no luck
i then uploaded my back up images file - no luck

i then, based on the error messages i was getting in both /shop/admin and the live shop, uploaded backups of my includes/functions files and my admin files - no luck

so, i have since, downloaded a new version of zen cart
http://www.animalvegetablemineral.net.au/order/ to see if i could identify what was wrong, and as you can see, this version also has a problem.

can anybody help?

22 May 2007, 11:25 AM
#9
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: HELP! Big problems

It is bug in PHP 5.2 to do with mb_str multibyte functions, allegedly fixed, but maybe not on your server?

A suggested fix is to add

php_flag mbstring.func_overload 0

to you .htaccess file.

23 May 2007, 6:00 AM
#10
kmh avatar

kmh

New Zenner

Join Date:
May 2007
Location:
Sydney, Australia
Posts:
25
Plugin Contributions:
0

Re: HELP! Big problems

thanks.
i have no idea what that means. overnight i deleted everything from my domain and uploaded zencart again this morning. fortunately i have been very thorough with my file keeping so have been able to ftp large parts of it back in.

23 May 2007, 6:09 AM
#11
kmh avatar

kmh

New Zenner

Join Date:
May 2007
Location:
Sydney, Australia
Posts:
25
Plugin Contributions:
0

Re: HELP! Big problems

famous last words it's back!:frusty:
so now i need to work out what your last message was mr chuckl

23 May 2007, 8:54 AM
#12
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: HELP! Big problems

Good luck, I have trouble working it out....

The empty haystack error is allegedly caused by a bug in some versions of PHP, and is supposedly caused by the following:

The character sets used in many countries can be quite happily represented by single byte 8bit characters, but many others require multi-byte characters. As a result, PHP has it's original single byte character and string handling routines, and multibyte equivalents. e.g. The string position function strpos has a multibyte equivalent mb_strpos.
Each of those is passed 2 parameters, the first, a character string, and the second, also a char string, to be looked for in the first string.
Now some programmer, working late at night decided that this was like looking for a needle in a haystack, and coded it mb_strpos(Haystack, Needle).
Hence the 'Empty Haystack'.....
The mb_ functions can also be 'overloaded' meaning that is the single character functions are used with a multibyte string, the mb_ functions are automatically used, meaning that you don't have to change the code. Or maybe they are used all the time?

That takes care of the 'what' now the 'why'.

Certain releases of PHP are said to have a bug, that if while using the mb_ functions, they hit a character in the 'Haystack' they believe is not part of that character ste, they don't skip over and contiue, but exit with an error. Hence the 'Empty Haystack'.

A possible cure is said to be to remove the overloading of the mb_ functions, with the code I posted in the last thread. Since on most hosted sites you cannot alter the PHP setup, this is often settable in a .htaccess file.

24 May 2007, 4:19 AM
#13
kmh avatar

kmh

New Zenner

Join Date:
May 2007
Location:
Sydney, Australia
Posts:
25
Plugin Contributions:
0

Re: HELP! Big problems

Hey Chuckl - you are clearly more technically advanced than I....

I also posted to :
http://www.zen-cart.com/forum/showthread.php?p=379152#post379152

and although nobody responded I worked through all i could find on forums, and my files and a bit of lateral thinking - have posted the rest of the detail there if you are interested.