php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42938 error on page
Submitted: 2007-10-11 23:37 UTC Modified: 2007-10-11 23:57 UTC
From: ilovephp@php.net Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.4 OS: freebsd 6.2
Private report: No CVE-ID: None
 [2007-10-11 23:37 UTC] ilovephp@php.net
Description:
------------
<?php
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",
    "<b>example: </b><div align=left>this is a test</div>",
    $out, PREG_PATTERN_ORDER);
echo $out[0][0] . ", " . $out[0][1] . "\n";
echo $out[1][0] . ", " . $out[1][1] . "\n";
?>

Fatal error: Call to undefined function preg_match_all() in /usr/local/www/phpMyAdmin/test.php on line 1

Reproduce code:
---------------
<?php
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",
    "<b>example: </b><div align=left>this is a test</div>",
    $out, PREG_PATTERN_ORDER);
echo $out[0][0] . ", " . $out[0][1] . "\n";
echo $out[1][0] . ", " . $out[1][1] . "\n";
?>

Fatal error: Call to undefined function preg_match_all() in /usr/local/www/phpMyAdmin/test.php on line 1

Expected result:
----------------
<?php
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",
    "<b>example: </b><div align=left>this is a test</div>",
    $out, PREG_PATTERN_ORDER);
echo $out[0][0] . ", " . $out[0][1] . "\n";
echo $out[1][0] . ", " . $out[1][1] . "\n";
?>

Fatal error: Call to undefined function preg_match_all() in /usr/local/www/phpMyAdmin/test.php on line 1

Actual result:
--------------
<?php
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",
    "<b>example: </b><div align=left>this is a test</div>",
    $out, PREG_PATTERN_ORDER);
echo $out[0][0] . ", " . $out[0][1] . "\n";
echo $out[1][0] . ", " . $out[1][1] . "\n";
?>

Fatal error: Call to undefined function preg_match_all() in /usr/local/www/phpMyAdmin/test.php on line 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-11 23:57 UTC] scottmac@php.net
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 http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Enable PCRE then, or in the case of FreeBSD install the port.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC