php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5913 preg_match_all makes script generate no output
Submitted: 2000-08-02 03:25 UTC Modified: 2000-08-02 19:47 UTC
From: verx at iq dot pl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (02/08/2000) OS: Linux 2.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: verx at iq dot pl
New email:
PHP Version: OS:

 

 [2000-08-02 03:25 UTC] verx at iq dot pl
//script is using mysql to connect to database

// $match doesn't matter - tried different patterns
$match = '/a/';
//if the following line is disabled everything goes as usual
//also the third element ($bout) is not the problem - tried
//without it - script won't run at all (no output - no
//errors)
preg_match_all($match, $body, $bout);

it seems like it dies after the first preg_match_all.
$body is fetched via mysql_fetch_array - it seems like preg_match_all doesn't like data from sql - if i pass a string (in the same script) - everything goes well... 

strange it is :)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-02 12:51 UTC] waldschrott@php.net
Please provide the exact string you?ve fetched from the db...
 [2000-08-02 13:53 UTC] verx at iq dot pl
the string - it doesn't matter.
i tried several strings. short, long, one line, multiline.
always the same. script dies when it encounters the first preg_match_all.

the same happens for php3 (latest). i have just tried it.

the script: http://tx.pl/edys/admin/script.txt
 
 [2000-08-02 17:31 UTC] stas@php.net
Could you please make reproducing script without DB accesses? It's impossible to test this way.
 [2000-08-02 19:44 UTC] verx at iq dot pl
ok. delete this bug as it is not a bug at all.
i found it to be an error in my database. and unfortunately i had an @ there so no error could be printed.

sorry! and keep up the good work :)
 [2000-08-02 19:47 UTC] rasmus@php.net
User error
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 11:00:01 2026 UTC