To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Upgrading PHP

Upgrading PHP Issues concerning PHP version upgrades and future releases

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-29-2004, 09:32 PM   #1
intenz
Xtreme Member
 
intenz's Avatar
 
Join Date: Aug 2001
Location: Reykjavik, Iceland
Posts: 506
Php5 + Pcre

When I try to use preg_match(), I get this...

Fatal error: Call to undefined function preg_match() in
/usr/home/www/library/defines.php on line 25

Apperantly this happen with all preg_* functions.

Any idea?

-----------------
Error line
-----------------

if (!preg_match('@([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2})@',
phpversion(), $match))

-----------------
Environment
-----------------

FreeBSD 4.10-STABLE
PHP 5.0.0
Apache 1.3.31
MySQL 4.0.20

-----------------
PHP Configure
-----------------

--enable-versioning
--enable-memory-limit
--with-layout=GNU
--disable-all
--enable-libxml
--with-libxml-dir=/usr/local
--enable-spl
--with-regex=php
--disable-cli
--with-apxs=/usr/local/sbin/apxs
--disable-ipv6
--prefix=/usr/local
__________________
Curiosity killed the cat.
intenz is offline   Reply With Quote
Old 07-29-2004, 09:39 PM   #2
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
I was under the impression PHP 5 was built in PCRE support but you may find this informative

http://www.php.net/manual/en/ref.pcre.php seems weird that its compiled in with PHP 4. Ive never personally had a problem with it
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA
planetsim is offline   Reply With Quote
Old 07-30-2004, 10:44 AM   #3
goldbug
50,000 Watts of Goodwill
 
goldbug's Avatar
 
Join Date: May 2003
Location: Rummaging through your garbage.
Posts: 1,326
My install does not produce the same error. Might be a libraries issue.

My environment:
FreeBSD 4.10-STABLE
PHP 5.0.0
Apache 2.0.50
MySQL 4.0.20

My config script:
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--disable-cgi \
--enable-safe-mode \
--enable-magic-quotes \
--disable-short-tags \
--enable-versioning \
--with-libxml-dir=/usr/local \
--with-openssl=/usr \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--enable-exif \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--enable-gd-native-ttf \
--with-iconv=/usr/local \
--with-mcrypt=/usr/local \
--with-mssql=/usr/local \
--with-mysql=/usr/local/mysql \
--with-pgsql=/usr/local/pgsql \
--with-pspell=/usr/local \
--enable-sockets \
--enable-sqlite-utf8 \
--with-xsl=/usr/local


One thing you might consider trying: take out the --with-regex=php line in your configure statement.
__________________
Many eyes make few mistakes

goldendance

Last edited by goldbug; 07-30-2004 at 10:46 AM.
goldbug is offline   Reply With Quote
Old 07-30-2004, 04:03 PM   #4
intenz
Xtreme Member
 
intenz's Avatar
 
Join Date: Aug 2001
Location: Reykjavik, Iceland
Posts: 506
It worked when I added:
Code:
--with-pcre-regex=yes
Silly it's not default builtin, like in PHP4 and earlier.
__________________
Curiosity killed the cat.
intenz is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 03:10 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.