Page 1 of 2
[small important bugfix] for 1.2.8 2006/08/07
Posted: Thu 10. Aug 2006, 14:23
by Oliver Georgi
Please open
include/inc_lib/default.inc.php and change function:
Code: Select all
function buildGlobalGET($return = '') {
// build internal array containing all GET values
// and remove session from this array
$GLOBALS['_getVar'] = array();
if(isset($_GET) && session_id()) {
unset($_GET[session_name()]);
$GLOBALS['_getVar'] = $_GET;
}
if($retun == 'getQuery') { // <------------------------THIS LINE
return returnGlobalGET_QueryString('htmlentities');
}
}
to
Code: Select all
function buildGlobalGET($return = '') {
// build internal array containing all GET values
// and remove session from this array
$GLOBALS['_getVar'] = array();
if(isset($_GET) && session_id()) {
unset($_GET[session_name()]);
$GLOBALS['_getVar'] = $_GET;
}
if($return == 'getQuery') { // <------------------------THIS LINE
return returnGlobalGET_QueryString('htmlentities');
}
}
Oliver
changeing results in a parserror
Posted: Thu 10. Aug 2006, 17:02
by beat
Hi Oliver
changes in default.inc.php resulted in a parse error
Posted: Thu 10. Aug 2006, 17:06
by flip-flop
Re: changeing results in a parserror
Posted: Thu 10. Aug 2006, 17:23
by Oliver Georgi
beat wrote:Hi Oliver
changes in default.inc.php resulted in a parse error
Check your function again!!!!
Code: Select all
function buildGlobalGET($return = '') {
// build internal array containing all GET values
// and remove session from this array
$GLOBALS['_getVar'] = array();
if(isset($_GET) && session_id()) {
unset($_GET[session_name()]);
$GLOBALS['_getVar'] = $_GET;
}
if($return == 'getQuery') {
return returnGlobalGET_QueryString('htmlentities');
}
}
It's just that little missing "r" $retun -> $return
Oliver
Posted: Fri 11. Aug 2006, 10:21
by Ctrl-Alt
Oliver Georgi wrote:It's just that little missing "r" $retun -> $return
I have changed that file, but I still can't use the search. This error message is displayed when I click on the search button:
Fatal error: Call to undefined function: mb_strlen() in [...]/include/inc_front/content/cnt13.article.inc.php on line 52
Any idea how to solve that issue? I use version 1.2.8.
Posted: Fri 11. Aug 2006, 10:35
by flip-flop
Hi Ctrl-Alt,
what php version is running at your server?
This function call needs PHP 4 >= 4.0.6, PHP 5
Second: Please upload /include/inc_front/content/cnt13.article.inc.php again.
regards Knut
Posted: Fri 11. Aug 2006, 10:39
by Ctrl-Alt
flip-flop wrote:what php version is running at your server?
Hello Knut, I use PHP version 4.3.10 and uploaded cnt13.article.inc.php again. Unfortunately that doesn't solve the problem.
it was that r
Posted: Fri 11. Aug 2006, 10:42
by beat
I copied the value from the forum into the file this must have caused the error. It doe's now work!!! it was only that r.
Oliver sorry.
Posted: Fri 11. Aug 2006, 11:30
by flip-flop
@Ctrl-Alt:
Let´s make a little test.
Please copy this snippet into a file named test01.php at your root folder.
Call this little php file:
http://mydomain.tld/test01.php
Output: long string
Does it work?
Code: Select all
<?php
$myvalue="TEST";
if(mb_strlen($myvalue) > 3) {
echo "long string";
}
else {
echo "short string";
}
?>
Posted: Fri 11. Aug 2006, 11:46
by Ctrl-Alt
flip-flop wrote:Does it work?
Sorry, it does not work. The error message is as follows:
Code: Select all
Fatal error: Call to undefined function: mb_strlen() in /home/httpd/vhosts/arkoo.nl/httpdocs/nieuw/test01.php on line 3
Posted: Fri 11. Aug 2006, 12:02
by pico
Hi
take a look to that
mbstring is a non-default extension. This means it is not enabled by default. You must explicitly enable the module with the configure option. See the Install section for details.
http://www.php.net/manual/de/ref.mbstring.php
Posted: Fri 11. Aug 2006, 12:10
by flip-flop
Yes, that´s it. Have a look into your phpinfo().
First section: Configure Command -> --enable-mbstring
Posted: Fri 11. Aug 2006, 12:30
by Ctrl-Alt
flip-flop wrote:--enable-mbstring
OK, now I understand why it doesn't work. --enable-mbstring is not mentioned in phpinfo().
The site is on a shared server. Would it be possible to enable mbstring in .htaccess? I have searched, but was unable to find that.
Posted: Fri 11. Aug 2006, 12:36
by Oliver Georgi
I will implement a fallback for "mb" - which always should be enabled by default.
Oliver
Re: [small important bugfix] for 1.2.8 2006/08/07
Posted: Sun 13. Aug 2006, 02:35
by Goran
Oliver Georgi wrote:Please open include/inc_lib/default.inc.php and change function:....
Oliver
Just downladed the 20060807_phpwcms_1.2.8.zip file and function buildGlobalGET looks different, it's not only the missing "r"...:
Code: Select all
function buildGlobalGET($return = '') {
// build internal array containing all GET values
// and remove session from this array
$GLOBALS['_getVar'] = array();
if(isset($_GET)) {
$sessName = session_name();
$GLOBALS['_getVar'] = $_GET;
if(isset($_getVar[$sessName])) unset($GLOBALS['_getVar'][$sessName]);
}
if($retun == 'getQuery') {
return returnGlobalGET_QueryString('htmlentities');
}
}
Oliver, did I miss something..need to replace entire code?