NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Fatal error: Call to undefined function mb_ereg()


Joined: 30 May 2012
Posts: 1
Location: United kingdom of great britain
Reply with quote
I am in the process of updating a weather project which uses PHP for the data retrieval and processing.

The main problem I have encountered so far is the widespread use of 'ereg' which is now deprecated. So I have started to go through the code replacing 'ereg' with 'mb_ereg' as this seems to be the most common way ( searching using Google)

I have Xampp 1.7.7 installed which includes PHP v 5.3.8

I am trying to run the (weather) test settings in PhpED (v7.0) I get the following error message:

<<Fatal error: Call to undefined function mb_ereg() in C:\xampp\htdocs\phpweather\pw_utilities.php on line 94>>

If I run the test settings directly through Firefox using 'http://localhost/phpweather/index.php' it works perfectly, and the desired results are displayed.

If I do the same but use 'http://localhost:8080/phpweather/index.php', I get the error message:

<<Fatal error: Call to undefined function mb_ereg() in C:\xampp\htdocs\phpweather\pw_utilities.php on line 94>>

I am new to PhpED, so I am not sure what version of PHP is being used when I run PhpED.

I have set the PHP version (SRV and CLI modes) to PHP 5.3 and higher in the Settings, Server port is 8080; Bind to localhost only is set; Default documents are set to index.php & index.html

Project properties are Root directory ; c:\xampp\htdocs; Run mode is HTTP mode (SRV local WEB server)

Parser properties are Target PHP version is 5.3 and higher; Target HTML version is HTML 4.0 Transitional; and Target CSS version is CSS 2.1

The only setting I am not sure about is the Run mode and what the 3 options mean

Any help would be greatly appreciated.
View user's profileFind all posts by tcwSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Obviously mb_ereg (as well as other mbXXX) functions is not a part of php core. You have to install/enable mbstring php extension (php_mbstring.dll) in php.ini and restart web server.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[SOLVED]


Joined: 09 Sep 2012
Posts: 1
Location: Switzerland
Reply with quote
dmitri wrote:
Obviously mb_ereg (as well as other mbXXX) functions is not a part of php core. You have to install/enable mbstring php extension (php_mbstring.dll) in php.ini and restart web server.


Hi dmitri

I'm brand new to the forum, nevertheless bought PhpEd 5.9 when it was your most recent release and happy with it so far

Now, new project on Win7 and need to debug locally, no remote server so far.

So yes, how can we install the mbstring php extension (php_mbstring.dll) in php.ini ?


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[SOLVED]

Ok, updated all php.ini files found in C:\Program Files (x86)\NuSphere\PhpED\php[5x]

Sorry 4 that and your precious time, Could have thought about it prior to posting :/
View user's profileFind all posts by emanwebdevSend private message
[resolved] Fatal error: Call to undefined function mb_ereg()
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic