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
What is can be wrong?
Thanks
andrew
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).
See http://php.benscom.com/manual/en/ref.pcre.php for more information.
Regards,
-l
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
On 17 Dec 2005, at 20:03, phil wrote:
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;
if(!extension_loaded('pcre')) { // it's not loaded so try to load it if(!dl('pcre.so')) { // we can't load it die("You need the PCRE extension installed ..."); } }
// here we could use your suggested function to check if the PCRE // ext is recent enough to use.
Yours, Craig -- Craig Webster | t: +44 (0)131 516 8595 | e: craig@xeriom.net Xeriom.NET | f: +44 (0)709 287 1902 | w: http://xeriom.net