Edit report at https://bugs.php.net/bug.php?id=53955&edit=1

 ID:               53955
 Updated by:       [email protected]
 Reported by:      rick at lavoo dot com
 Summary:          preg_match_all missing results
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          *Regular Expressions
 Operating System: FreeBSD 7.2-RELEASE
 PHP Version:      5.3.5

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2011-02-08 09:10:44] [email protected]

Without a test script we can actually run, we have no way of checking if this 
is 
actually a bug.

Simplify the script down to a smaller set of documents, embed them in a 
standalone 
script that we can download somewhere, and we can have a look.

------------------------------------------------------------------------
[2011-02-08 09:06:08] rick at lavoo dot com

Description:
------------
phpinfo(); http://corgfx.com/info.php

preg_match_all is missing valid results while running in a loop of documents. 
There are 12 valid matches per document, but starting from document 5 only 11 
results are returned. When the script is run "only" on document 5 or 6 or 7 
etc, all 12 results are returned properly.

The script returns no warnings or errors when running in the loop and missing 
the 12th result.

Test script:
---------------
This is an example of the code being used:

    for ($i = 0; $i <= $pages; $i++) {
        shell_exec(" /usr/local/bin/curl -o /tmp/coffee_process_ajax.tmp -b 
PHPSESSID=$cookie -d \"category_id=$cat&page_index=$i\" 
http://www..........com/html/results_ajax.php";);
        $filename = "/tmp/coffee_process_ajax.tmp";
        $handle = fopen($filename, "r");
        $adata = fread($handle, filesize($filename));
        fclose($handle);
        preg_match_all("/<table class=AssetContent>(.*?)<\/table>/", 
str_replace("\n","",$adata), $ajarray);
        $saveThis[]=$ajarray[0];
    }

Expected result:
----------------
The expected result is all 12 results to be returned with and without the loop.

Actual result:
--------------
Returns only 11 results starting at $page=4 (the 5th document) while running in 
the loop. Returns all 12 results for $page=4 when not running in the loop.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=53955&edit=1

Reply via email to