|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29303 PHP returns Call to undefined function: preg_replace()
Submitted: 2004-07-21 15:39 UTC Modified: 2004-07-21 22:40 UTC
From: phpbugs at gushi dot org Assigned:
Status: Not a bug Package: Regexps related
PHP Version: 4.3.8 OS: FreeBSD 4.10-RELEASE (Others?)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
13 + 2 = ?
Subscribe to this entry?

 [2004-07-21 15:39 UTC] phpbugs at gushi dot org
Using PHP 4.3.8 a call to the function preg_replace yields the error:

Call to undefined function: preg_replace()

Similar behavior is not seen with php 4.3.7 built with the same configure arguments (--with-apxs --with-mysql=/usr/local)

Reproduce code:
The code producing the bug is VBulletin, in the following function:

$scriptpath = preg_replace('/(s|sessionhash)=[a-z0-9]{32}?&?/', '', $scriptpath);

Expected result:
The variable $scriptpath to be set.

Actual result:
Fatal error: Call to undefined function: preg_replace() in /usr/home/admin/community/includes/init.php on line 268


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-21 22:40 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You simply don't have the PCRE extension compiled. 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 07:01:28 2024 UTC