Hi,
I'm moving a website with PHP content from a Mac server to a Linux server (Redhat AS4), but at least one page is not working on the Linux host. Unfortunately, I know next to nothing about PHP. The problem page is showing up blank and Apache's error_log shows the following:
Code:
[client 1.2.3.4] PHP Notice: Undefined index: q in /web/html/acad/dict/includes/search-commands.php on line 12, referer: http://ourhost.com/problem/path/
[client 1.2.3.4] PHP Fatal error: Call to undefined function: mb_strlen() in /web/html/acad/dict/includes/search-commands.php on line 15, referer: http://ourhost.com/problem/path/
The lines in the file referenced are the following:
Line 12:
Code:
$search_str = strtr($_GET['q'], array("*" => ".*"));
Line 15:
Code:
if (mb_strlen($search_str, 'UTF-8') > 0) {
If I comment out line 15 (and the closing curly brace) it *appears* to work properly -- the page appears and I'm able to get results from the mysql database the page queries against -- but then new errors occur:
Resolving the first set of errors may resolve these errors as well, though.
This machine is running PHP 4.3.9 (also has php-mysql-4.3.9 and php-devel 4.3.9). The Mac server that it works on is running PHP 4.4.8. And another Linux machine it works on is running PHP 4.3.2 (also php-mysql and php-imap; same versions).
Anyone have any ideas? I can provide more info about the PHP implementation or the system if needed, just let me know what you need.
Thanks.