Page 1 of 1

serendipity_event_entrypaging

Posted: Tue Nov 13, 2007 8:25 pm
by JWalker
Hi,

I've just looked in my Apache's error.log and saw this:

Code: Select all

[Tue Nov 13 21:05:12 2007] [error] [client 192.168.20.178] PHP Warning:  mb_stristr() [<a href='function.mb-stristr'>function.mb-stristr</a>]: Empty delimiter. in D:\\biz\\apps\\serendipity\\plugins\\serendipity_event_entrypaging\\serendipity_event_entrypaging.php on line 142, referer: http://walker/sblog/
I don't know what is the cause of this warning, my blog looks OK. May be this is a pointer to something [bad] in that plugin.

Additional information:

Code: Select all

if ($event == 'css') {
    if (stristr('.serendipity_entrypaging', $addData)) { // <<<<<<<<<< 142 line
// class exists in CSS, so a user has customized it and we don't need default
        return true;
    }

Re: serendipity_event_entrypaging

Posted: Wed Nov 14, 2007 10:13 am
by garvinhicking
Hi!

Seems your server has hardcoded mbstring overloading enabled. This is a thing that s9y can't really check for, and it seems that mb_stristr that overloads stristr() has a different syntax argument list.

Which PHP version are you using? You might need to update that, or disable the mbstring hard overloading (which might have a side effect on applications other than s9y on your server!)

Regards,
Garvin

Posted: Wed Nov 14, 2007 6:20 pm
by JWalker
Hi,

My configuration is : Apache 2.0.61 (Win32) / DAV/2 SVN 1.4.5 / PHP 5.2.4

From php.ini

Code: Select all

[mbstring]
; language for internal character representation.
;mbstring.language = Japanese

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
;mbstring.internal_encoding = EUC-JP

; http input encoding.
;mbstring.http_input = auto

; http output encoding. mb_output_handler must be
; registered as output buffer to function
;mbstring.http_output = SJIS

; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
;       portable libs/applications.
;mbstring.encoding_translation = Off

; automatic encoding detection order.
; auto means
;mbstring.detect_order = auto

; substitute_character used when character cannot be converted
; one from another
;mbstring.substitute_character = none;

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
mbstring.func_overload = 7

; enable strict encoding detection.
;mbstring.strict_encoding = Off

Posted: Wed Nov 14, 2007 6:22 pm
by garvinhicking
Hi!
mbstring.func_overload = 0
Regards,
Garvin

Posted: Wed Nov 14, 2007 6:39 pm
by JWalker
It works. The message did not appear anymore. :)