Skip to content
amelief edited this page Jun 19, 2011 · 1 revision

Table of Contents

Frequently Asked Questions

1. How do I install PHPAskIt?

Please see the ReadMe file.

2. I keep getting this error that says session has expired. What do I do?

That normally happens when you haven't got a valid token (ID used to make requests). Follow links to answer questions, don't try and type the URL into the address bar.

3. Foreign-language characters are appearing strangely, how can I make them show up properly?

Unfortunately, PHPAskIt 3.0 does not support non-latin characters very well. This will be fixed in the next version (3.1). Until then, there are a few changes that can be made to make it work but it requires editing of the code and is not guaranteed to work.

1. Change your database to use the utf8_general_ci collation. You can do this from within a tool such as phpMyAdmin. You need to change the table AND the fields.

2. Open functions.php, find this line (line 493 or thereabouts):

$pai->table = $pai->cleaninput(PAI_TABLE);

After that line, add this line:

$pai->query("SET names 'utf8'");

3. Find this line (around line 44):

$data = trim(htmlspecialchars(strip_tags($data)));

Change it to this:

$data = trim(htmlentities(strip_tags($data), ENT_QUOTES, 'UTF-8'));

4. Find this line (around line 223):

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

Change it to:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

5. Make sure your header include is using the UTF-8 encoding, this normally looks like this in HTML:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

4. Save and reupload functions.php and this should allow non-latin characters. Please note however that as stated, this is NOT guaranteed and this may or may not work for you.