【CakePHP】alphaNumeric修正

centos系でCakePHP1.3.8をインストールすると以下のメッセージが表示される。
「PCRE has not been compiled with Unicode support.」

PCREを修正するのは面倒なので以下サイトを参考に修正

http://www.ryuzee.com/contents/blog/2274


libs内のvalidation.php
修正前:
function alphaNumeric($check) {
$_this =& Validation::getInstance();
$_this->__reset();
$_this->check = $check;

if (is_array($check)) {
$_this->_extract($check);
}

if (empty($_this->check) && $_this->check != '0') {
return false;
}
$_this->regex = '/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/mu'; ←ここを修正
return $_this->_check();
}

修正後:
function alphaNumeric($check) {
$_this =& Validation::getInstance();
$_this->__reset();
$_this->check = $check;

if (is_array($check)) {
$_this->_extract($check);
}

if (empty($_this->check) && $_this->check != '0') {
return false;
}
$_this->regex = '/^[a-z\d]*$/i'; ←ここを修正
return $_this->_check();
}