Subject: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 03:15am
By: ::Ben

My Geeklog testing site on wampserver (windows 7) is not stable. The first day everything is ok but the next day i get this fatal error

PHP Formatted Code
 Fatal error: Call to undefined function MBYTE_strlen() in C:\wamp\www\geeklog-2.0.0\system\lib-plugins.php on line 1650
Call Stack
#       Time    Memory  Function        Location
1       0.0245  1216568 {main}( )       ..\users.php:0
2       0.0347  4137152 require_once( 'C:\wamp\www\geeklog-2.0.0\public_html\lib-common.php' )  ..\users.php:47
3       0.0847  9087048 require_once( 'C:\wamp\www\geeklog-2.0.0\system\lib-sessions.php' )     ..\lib-common.php:274
4       0.0848  9087808 SESS_sessionCheck( )    ..\lib-sessions.php:66
5       0.0858  9089152 COM_displayMessageAndAbort( )   ..\lib-sessions.php:238
6       0.0858  9089816 COM_createHTMLDocument( )       ..\lib-common.php:7203
7       0.0872  9109704 COM_renderMenu( )       ..\lib-common.php:1872
8       0.0872  9110536 Template->parse( )      ..\lib-common.php:858
9       0.0872  9110536 Template->subst( )      ..\template.class.php:618
10      0.0872  9110536 Template->loadfile( )   ..\template.class.php:535
11      0.0874  9111040 Template->_preprocess( )        ..\template.class.php:939
12      0.0874  9111040 PLG_replaceTags( )      ..\template.class.php:185


This is note related to MBYTE_strlen function or theme.

Ben

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 05:43am
By: dengen

I also often encountered the same error.
My testing site is built with Windows8 and XAMPPlite version 1.7.1.
This error does not occur with Geeklog version 1.8.0.
This error seems to occurred with call to the COM_displayMessageAndAbort function in line 161 of the lib-sessions.php.

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 07:30am
By: mystral-kk

Try the following:

1. Move the line 285 of lib-common.php before line 274. This is to include 'lib-mbyte.php' before 'lib-sessions.php'.

2. Change the line 95 of lib-mbyte.php from

if (strcasecmp($LANG_CHARSET, 'utf-8' ) == 0) {

to

if (strcasecmp(COM_getCharset(), 'utf-8' ) == 0) {

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 07:45am
By: ::Ben

@ dengen This is the first time ever I notice this issue

@ mystral-kk Thank you for the tip. Maybe this improvement could be added to the next official release.

Ben

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 07:56am
By: mystral-kk

Quote by: ::Ben

@ dengen This is the first time ever I notice this issue

@ mystral-kk Thank you for the tip. Maybe this improvement could be added to the next official release.

Ben



Ben, my suggestion worked?

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 11:51am
By: dengen

@ mystral-kk Did not work.
A new error has occurred.

PHP Formatted Code
Fatal error: Call to a member function getHeader() on a non-object in C:\www\nightly2\lib-common.php on line 2059


Maybe, there is also a problem with the order of the include files.
It's a potential problem found, as it happens.
Another thing, there seems to be a problem relevant to the cookie.

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 12:02pm
By: ::Ben

Ben, my suggestion worked?

Untill now yes Smile

Ben

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 06:38pm
By: mystral-kk

Quote by: dengen

@ mystral-kk Did not work.
A new error has occurred.

PHP Formatted Code
Fatal error: Call to a member function getHeader() on a non-object in C:wwwnightly2lib-common.php on line 2059


Maybe, there is also a problem with the order of the include files.
It's a potential problem found, as it happens.
Another thing, there seems to be a problem relevant to the cookie.



Well, then, let's revert "lib-mbyte.php". This error happens while "lib-common.php" is including "lib-sessions.php" (at line 274) and you hit a longin speed limit at line 161 or 238 in "lib-sessons.php". COM_displayMessageAndAbort() is called to show an error message but "lib-common.php" is not fully initialized, so $_SCRIPTS is still undefined. I think replacing COM_displayMessageAndAbort() in "lib-sessions.php" with the following primitive code:

PHP Formatted Code

header('Content-Type: text/plain; charset=utf-8');
echo 'You have exceeded the number of allowed login attempts.  Please try again later.';
exit;
 


Re: Geeklog 2.0.0 issue on wampserver

Posted on: 07/04/13 06:56pm
By: mystral-kk

Or, we may as well define a constant to show if "lib-common.php" is initialized and refer to it in COM_displayMessageAndAbort() to decide whether to call COM_createHTMLDocument() or not.

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 08/04/13 03:39am
By: ::Ben

Today, I get this one too on the first connection attempt:

Fatal error: Call to a member function getHeader() on a non-object in C:\wamp\www\geeklog-2.0.0\public_html\lib-common.php on line 2061


Ben

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 08/04/13 04:57am
By: mystral-kk

Quote by: ::Ben

Today, I get this one too on the first connection attempt:

Fatal error: Call to a member function getHeader() on a non-object in C:wampwwwgeeklog-2.0.0public_htmllib-common.php on line 2061


Ben



I tied to fix this problem and modified "lib-common.php". If you have access to Geeklog code repository ( http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/ ), get the latest version and replace "lib-common.php". However, as dengen said, the true cause of login failures seems to be cookies.

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 08/04/13 05:58pm
By: ::Ben

I noticed there is also multi speedlimit recorded for only one login attempt, but if I delete all cookies only one speedlimit is recorderd.

Ben

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 14/05/13 11:13am
By: kkbass

I am having the same error with my geeklog 2.0.0 server on linux - lib-plugins.php on line 1650. I tried replacing the lib-plugins.php with the latest one from here http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/file/9a01f429338b/public_html but now it gives me another error Parse error: syntax error, unexpected T_STRING in /home/krumfrie/public_html/geeklog/lib-common.php on line 1.

Now what?

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 14/05/13 01:02pm
By: Dirk

Quote by: kkbass

now it gives me another error Parse error: syntax error, unexpected T_STRING in /home/krumfrie/public_html/geeklog/lib-common.php on line 1.

Now what?


Sounds like that download didn't go well. The lib-common.php file should always start with: <?php

Try this link instead, it should download lib-common.php as a "raw" file.

bye, Dirk

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 14/05/13 01:10pm
By: kkbass

Quote by: Dirk

Quote by: kkbass

now it gives me another error Parse error: syntax error, unexpected T_STRING in /home/krumfrie/public_html/geeklog/lib-common.php on line 1.

Now what?


Sounds like that download didn't go well. The lib-common.php file should always start with: <?php

Try this link instead, it should download lib-common.php as a "raw" file.

bye, Dirk


Well, I am back to the original "Fatal error: Call to undefined function MBYTE_strlen() in /home/krumfrie/geekdata/system/lib-plugins.php on line 1650" error now.

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 14/05/13 02:13pm
By: Dirk

Quote by: kkbass

Well, I am back to the original "Fatal error: Call to undefined function MBYTE_strlen() in /home/krumfrie/geekdata/system/lib-plugins.php on line 1650" error now.



Hmm, the bug is marked as resolved on our bugtracker - sounds like that may not be the case.

We did talk on IRC, didn't we? Have you tried emptying the gl_sessions and gl_speedlimit tables and/or deleted your cookies for the site? As I mentioned on IRC, I thought this problem only occurs when you have a login problem.

Any other information that you can think of that could be relevant?

bye, Dirk

Re: Geeklog 2.0.0 issue on wampserver

Posted on: 14/05/13 02:29pm
By: kkbass

I did come on irc about this (there now still). Being as new to geeklog as I am, I don't know about emptying the gl_sessions and gl_speedlimit tables and/or deleted my cookies for the site.

Nothing really fancy going on with the site & the few plugins I have were all linked from geeklog.net's plugin list. I don't remember all that were installed & their versions.

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=94883