Dec 04, 2008 | 07:18 AM  
Welcome

Don't have an account yet? You can create one, it is free, just click here

as a registered user you have some advantages like free downloads, comments and posting on our forums, depending upon this site's configuration and options.

 • •  Control Panel - Register - Login  • • 
Current Stable MDPro Lite 1.0821 Download
  Forum FAQForum FAQ   SearchSearch  UsergroupsUsergroups  PreferencesPreferences  Options forumOptions forum  Watched TopicsWatched Topics  Watched ForumsWatched Forums
Latest forum posts Latest forum posts  Log in to check your private messages Log in to check your private messages    Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
whitevamp
MD user level 1
MD user level 1


Joined: Nov 21, 2004
Posts: 11

Member
Post  Posted: Dec 29, 2004 - 01:46 PM Reply with quote Back to top
Post subject: Call to undefined function: preg_match_all()

i had an older ver of php install so I upgraded to PHP Version 4.3.10
and now when i try to got to my site i get a blank page ,so I looked in the logs to see what was there and this is what i found
[Tue Dec 28 17:15:18 2004] [error] PHP Fatal error: Call to undefined function: preg_match_all() in /usr/local/www/data/includes/classes/phpSniff.core.php on line 366

and heres the entire section of 366
--> indicates line 366

function _get_browser_info ()^M
{ $this->_build_regex();^M
--->if(preg_match_all($this->_browser_regex,$this->_browser_info['ua']  ,$results))^M
{ // get the position of the last browser found^M
$count = count($results[0])-1;^M
// if we're allowing masquerading, revert to the next to last browser found^M
// if possible, otherwise stay put^M
if($this->_allow_masquerading && $count > 0) $count--;^M
// insert findings into the container^M
$this->_set_browser('browser',$this->_get_short_name($results[1][$coun t]));^M
$this->_set_browser('long_name',$results[1][$count]);^M
$this->_set_browser('maj_ver',$results[2][$count]);^M
// parse the minor version string and look for alpha chars^M
preg_match('/([.\0-9]+)?([\.a-z0-9]+)?/i',$results[3][$count],$match); ^M
if(isset($match[1])) {^M
$this->_set_browser('min_ver',$match[1]);^M
} else {^M
$this->_set_browser('min_ver','.0');^M
}^M
if(isset($match[2])) $this->_set_browser('letter_ver',$match[2]);^M
// insert findings into container^M
$this->_set_browser('version',$this->_browser_info['maj_ver'].$this->p roperty('min_ver'));^M
}^M
}^M
^M
im useing MD-Pro 1.0.71 final release

and thanks inadvance for any help on this issue
View user's profile
PeteBest
MD user level 5
MD user level 5


Joined: Oct 06, 2003
Posts: 4845

bannato
Post  Posted: Dec 29, 2004 - 10:47 PM Reply with quote Back to top

Have you upgraded to the latest version of Zend Optimizer, as is stated on the php Download page

_________________
Retired from official MAXdev duties
View user's profile
whitevamp
MD user level 1
MD user level 1


Joined: Nov 21, 2004
Posts: 11

bannato
Post  Posted: Dec 30, 2004 - 07:03 AM Reply with quote Back to top

umm this is on a freebsd box and i used the ports system to upgrade php, so no i didnt , i didnt even know about abut a incompatabilty .. and i didnt have zend installed before..
but ill get it and install it ...
View user's profile
whitevamp
MD user level 1
MD user level 1


Joined: Nov 21, 2004
Posts: 11

bannato
Post  Posted: Dec 30, 2004 - 07:12 AM Reply with quote Back to top

i just installed zend-optimizer and still same error in the log files.
View user's profile
PeteBest
MD user level 5
MD user level 5


Joined: Oct 06, 2003
Posts: 4845

bannato
Post  Posted: Dec 30, 2004 - 07:22 AM Reply with quote Back to top

Odd, as far as I'm aware there haven't been any changes made to php in 4.3.10 that have made preg_match_all redundant. I'd re-check your php upgrade, as there are already lots of users with MD-Pro on 4.3.10 without any problems

If you get really desperate you could hack out that function, it's only there for language detection. Even if this does resolve your problem, think it'd only be masking the real issue though

_________________
Retired from official MAXdev duties
View user's profile
AbraCadaver
MD Staff
MD Staff


Joined: Aug 04, 2003
Posts: 137
Location: Katy, Texas USA
bannato
Post  Posted: Dec 30, 2004 - 04:11 PM Reply with quote Back to top

PHP has to be compiled with the PCRE library. It would be strange if it wasn't but you never know. Look at the phpinfo() output and see if it has --without-pcre-regex as a flag in the Configure Command section.

-Shawn
View user's profile Visit poster's website
whitevamp
MD user level 1
MD user level 1


Joined: Nov 21, 2004
Posts: 11

bannato
Post  Posted: Dec 31, 2004 - 12:19 PM Reply with quote Back to top

AbraCadaver wrote:
PHP has to be compiled with the PCRE library. It would be strange if it wasn't but you never know. Look at the phpinfo() output and see if it has --without-pcre-regex as a flag in the Configure Command section.

-Shawn


i dont see any thing like that ..
heres what i do see ..
Configure Command './configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-regex=php' '--with-apxs=/usr/local/sbin/apxs' '--disable-ipv6' '--prefix=/usr/local' 'i386-portbld-freebsd5.3'

and i have unistalled both apache and php and reinstalled them both and i still get that error in my log files..
and i have checked the php.ini to see if safe mode is off and it is ..
View user's profile
AbraCadaver
MD Staff
MD Staff


Joined: Aug 04, 2003
Posts: 137
Location: Katy, Texas USA
bannato
Post  Posted: Dec 31, 2004 - 02:05 PM Reply with quote Back to top

That's about all that it could be. Look in the phpinfo() page again and look for a section titled pcre that has a table that says something like this:

PCRE (Perl Compatible Regular Expressions) Support | enabled
PCRE Library Version | 4.5 01-December-2003

If not, then you need to re-compile PHP and check the docs to see how to make sure that PCRE gets compiled in. That's my only thought.

-Shawn
View user's profile Visit poster's website
whitevamp
MD user level 1
MD user level 1


Joined: Nov 21, 2004
Posts: 11

bannato
Post  Posted: Dec 31, 2004 - 10:24 PM Reply with quote Back to top

welp by looking through the ports dir i never had pcre installed befor . the update to apache and php i just installed it and still samething ..
View user's profile
whitevamp
MD user level 1
MD user level 1


Joined: Nov 21, 2004
Posts: 11

bannato
Post  Posted: Jan 09, 2005 - 05:53 PM Reply with quote Back to top

just whanted to post back and let every one know that i have solved this issue..
but to me its kinda weard that i had this all working fine till i upgraded php and apache then it stoped working and i had to install all these extra modules that i didnt have installed before.. any ways im venting..
thx for all the help on this issue
View user's profile
AbraCadaver
MD Staff
MD Staff


Joined: Aug 04, 2003
Posts: 137
Location: Katy, Texas USA
bannato
Post  Posted: Jan 12, 2005 - 04:13 AM Reply with quote Back to top

whitevamp wrote:
just whanted to post back and let every one know that i have solved this issue..
but to me its kinda weard that i had this all working fine till i upgraded php and apache then it stoped working and i had to install all these extra modules that i didnt have installed before.. any ways im venting..
thx for all the help on this issue


The problem is the way that PHP was compiled. When you get it from a package manager/ports collection you get what was compiled by someone else.

If they compile in all of the common modules then you are good. If not then you may have to load them.

-Shawn
View user's profile Visit poster's website
techlwcs
MD NewNew
MD NewNew


Joined: Jan 14, 2005
Posts: 1

bannato
Post  Posted: Jan 14, 2005 - 09:41 AM Reply with quote Back to top

So how did you end up fixing it. I think I may be having a similar problem...
View user's profile
nacredata
MD NewNew
MD NewNew


Joined: Nov 17, 2007
Posts: 2

bannato
Post  Posted: Nov 17, 2007 - 02:38 PM Reply with quote Back to top

Sumary: Ran into this problem with php server 4.4.7 from FreeBSD 6.2 ports. Adding --with-pcre-regex=yes to the end of the configure script worked.
Actions taken:
download, extract php into new directory (/usr/local/src).
Code:
./configure \
--enable-versioning \
--with-layout=GNU \
--with-config-file-scan-dir=/usr/local/etc/php \
--disable-all \
--program-prefix= \
--with-apxs=/usr/local/sbin/apxs \
--with-zlib=/usr \
--disable-ipv6 \
--prefix=/usr/local \
--mandir=/usr/local/man \
--infodir=/usr/local/info/ \
--with-pcre-regex=yes

make

make install

/usr/local/sbin/apachectl stop ; sleep 2 ; /usr/local/sbin/apachectl start ;
View user's profile
nacredata
MD NewNew
MD NewNew


Joined: Nov 17, 2007
Posts: 2

bannato
Post  Posted: Nov 17, 2007 - 02:56 PM Reply with quote Back to top

actually, ditch --disable-all \
View user's profile
Display posts from previous:     
Jump to:  
All times are GMT + 13 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by MDForum 2.0.8© 2003-2007 MAXdev Team
Credits