PHP regex that finds PHP errors

Tettinntil

New Member
I want PHP regex that can find errors on a page. So when I visit a site and crawl the page that I can list the errors on the site.Currently I have the following code:\[code\]preg_match('/<b>.+<\/b>:.+ in <b>\/.+<\/b> on line <b>[0-9]+<\/b><br( \/)?>/msi',$html,$errors);\[/code\]It can show if errors occurred, but it will not list them! I get the full html page in the array (\[code\]$errors[0]\[/code\])Could anybody help?EDIT:So I have a page with for example the following HTML-source, from which I want to extract the PHP errors:\[code\]<b>Warning</b>: session_start() [<a href='http://stackoverflow.com/questions/3892390/function.session-start'>function.session-start</a>]: The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in <b>/home/.../public_html/articlescript/init.php</b> on line <b>127</b><br /><br /><b>Warning</b>: session_start() [<a href='http://stackoverflow.com/questions/3892390/function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/.../public_html/articlescript/init.php:127) in <b>/home/.../public_html/articlescript/init.php</b> on line <b>127</b><br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <title>...\[/code\]
 
Back
Top