WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: php problem: "call to undefined function preg_replace()"  (Read 4472 times)

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
php problem: "call to undefined function preg_replace()"
« on: May 27, 2009, 02:42:34 AM »
I've installed NanoCMS but I'm getting the above error when I try to navigate to it's administration page.  Everything works if I'm using XAMPP, but when I don't use XAMPP and use apache2+libxml2+php instead, I'm getting the error.  Is this a bug with the php tce?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: php problem: "call to undefined function preg_replace()"
« Reply #1 on: May 27, 2009, 07:19:35 AM »
Google says that function is in PHP as a PCRE dependency. Seems the php extension was built without pcre.
The only barriers that can stop you are the ones you create yourself.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: php problem: "call to undefined function preg_replace()"
« Reply #2 on: May 27, 2009, 07:23:01 AM »
There's a pcre extension you could use.

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: php problem: "call to undefined function preg_replace()"
« Reply #3 on: May 27, 2009, 08:22:08 AM »
I am hoping robc will pick up on this thread and rebuild php5.tcel (it's marked as 'testing' anyways).

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: php problem: "call to undefined function preg_replace()"
« Reply #4 on: May 27, 2009, 12:28:00 PM »
Quote
Seems the php extension was built without pcre
Yes, this extension was built without pcre since no pcre extension is available for 1.x.

@PingPing: Are you using 1.x or 2.x?
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: php problem: "call to undefined function preg_replace()"
« Reply #5 on: May 27, 2009, 04:12:05 PM »
Hi robc.  I'm using 1.4.2.
From your post, I see there's a pcre.tcel in 2.x.  
I'm still getting the same error if I use 2.x
Is the pcre.tcel package build with preg_replace()?
Is there a reason why there's no pcre in 1.x?  Juanito?

Lots of questions, sry.
« Last Edit: May 27, 2009, 05:11:35 PM by PingPing »

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: php problem: "call to undefined function preg_replace()"
« Reply #6 on: June 03, 2009, 11:28:39 AM »
php5 has been updated to include pcre for TC 2.x
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard