On Sat, 17 Dec 2005 17:13:06 +0100, Léonard Bouchet roundcube@alternative.ch wrote:
On 17 déc. 05, at 14:09, Andrew Croft wrote:
Hello, I make everything like on docs, and now my server show me this message: Fatal error: Call to undefined function preg_replace() in /var/www/localhost/htdocs/westernlux.com/program/include/main.inc on line 37
It seems that your php version is installed without PCRE (perl compatible regular expression).
Is this something we could query with the installer and tell the user if they don't have it? This function checks the version, but could be modified and run on install;
function _unicode_check($errors = false) { // Set the standard C locale to ensure consistent, ASCII-only string handling. setlocale(LC_CTYPE, 'C');
// Check for outdated PCRE library // Note: we check if U+E2 is in the range U+E0 - U+E1. This test returns TRUE on old PCRE versions. if (preg_match('/[à -á]/u', 'â')) { if ($errors) { form_set_error('unicode', t('The PCRE library in your PHP installation is outdated. This will cause problems when handling Unicode text. If you are running PHP 4.3.3 or higher, make sure you are using the PCRE library supplied by PHP. Please refer to the <a href="%url">PHP PCRE documentation</a> for more information.', array('%url' => 'http://www.php.net/pcre'))); } return UNICODE_ERROR; }
http://fak3r.com - you don't have to kick it