php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29259 unexpected/lack of output from ereg & eregi
Submitted: 2004-07-19 15:30 UTC Modified: 2004-08-04 01:00 UTC
From: busmjn at lubs dot leeds dot ac dot uk Assigned:
Status: No Feedback Package: *Regular Expressions
PHP Version: 4.3.7 OS: SunOS webserv2 5.8 Generic_11735
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-07-19 15:30 UTC] busmjn at lubs dot leeds dot ac dot uk
Description:
------------
The size of the resulting string of the search using ereg & eregi seems to be limited.

Reproduce code:
---------------
$GrabData = ereg("$GrabStart(.*)$GrabEnd", $RetrieveFile, $DataPrint);

echo $DataPrint;

Where $GrabStart & $GrabEnd are items chosen within the $RetrieveFile



Expected result:
----------------
I was expecting whatever portion of $RetrieveFile to be output as determined by $GrabStart & $GrabEnd

Actual result:
--------------
It worked to a certain extent until $GrabStart & $GrabEnd where more than a certain distance apart in the file then it failed. 

ereg returned a value rather than TRUE or FALSE. The max value it returned before failure seemed to be around 8969
which corresponds to the amount of data returned which was about 8,920 bytes

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-20 02:46 UTC] iliaa@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.


 [2004-08-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 05:03:34 2021 UTC