multi words kb search return blank page

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
deserteagle369
Posts: 94
Joined: Wed Feb 29, 2012 2:00 am

multi words kb search return blank page

Post by deserteagle369 »

Script URL:
Version of script: 2.41
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:
I added multi words(seperate by space) search feature in my installation.
knowledgebase.php

Code: Select all

function hesk_kb_search($query) {
	global $hesk_settings, $hesklang;

    define('HESK_NO_ROBOTS',1);

	/* Print header */
    $hesk_settings['tmp_title'] = $hesklang['sr'] . ': ' . substr(hesk_htmlspecialchars(stripslashes($query)),0,20);
	require_once(HESK_PATH . 'inc/header.inc.php');
	hesk_kb_header($hesk_settings['kb_link']);

	$arr=preg_split('/[\s,]+/',$query); // zhang:seperate with space or comma
	for ($i=0;$i<count($arr);$i++) $arr[$i]='CONCAT(subject,content) LIKE "%'.$arr[$i].'%"'; //zhang:create conditions
	$cond=join(' AND ', $arr);
	$sql = 'SELECT t1.* FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_articles` AS t1 LEFT JOIN `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_categories` AS t2 ON t1.`catid` = t2.`id` WHERE t1.`type`=\'0\' AND t2.`type`=\'0\' AND ('.$cond.') ORDER BY subject DESC LIMIT 99';
if type more than 3 english words then press Enter, it work well, but if type more than 3 Chinese words,it show a blank page with the url like this:
any idea?
Eagle
Life is a journey.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: multi words kb search return blank page

Post by Klemen »

Do you get any errors if you enable Debug mode in HESK settings?

And check your server logs, it could be something on the server blocking the request (mod_security?).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply