[small important bugfix] for 1.2.8 2006/08/07

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

[small important bugfix] for 1.2.8 2006/08/07

Post 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
Last edited by Oliver Georgi on Thu 8. Mar 2007, 15:55, edited 1 time in total.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
beat
Posts: 99
Joined: Wed 23. Nov 2005, 15:18
Location: Gerzensee
Contact:

changeing results in a parserror

Post by beat »

Hi Oliver
changes in default.inc.php resulted in a parse error
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Please check once more, it works for me. :shock:
http://www.phpwcms.de/forum/viewtopic.php?p=70190#70190
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: changeing results in a parserror

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Ctrl-Alt
Posts: 6
Joined: Fri 11. Aug 2006, 10:16

Post 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.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post 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
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Ctrl-Alt
Posts: 6
Joined: Fri 11. Aug 2006, 10:16

Post 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.
beat
Posts: 99
Joined: Wed 23. Nov 2005, 15:18
Location: Gerzensee
Contact:

it was that r

Post 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.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post 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"; 
}
?>
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Ctrl-Alt
Posts: 6
Joined: Fri 11. Aug 2006, 10:16

Post 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
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Yes, that´s it. Have a look into your phpinfo().

First section: Configure Command -> --enable-mbstring
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Ctrl-Alt
Posts: 6
Joined: Fri 11. Aug 2006, 10:16

Post 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.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I will implement a fallback for "mb" - which always should be enabled by default.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Re: [small important bugfix] for 1.2.8 2006/08/07

Post 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?
Post Reply