Posted by:
peggy
(---.range86-151.btcentralplus.com)
Trying to get all errors to show using PHP 5 including Undefined Variables for local debugging and development.
php.ini
display_errors On
E_ALL & E_STRICT
At the top of every script I have:
error_reporting(E_ALL);
And nothing shows up an error not even in the log files (I'm not that good)
So I tried in the top of everypage:
error_reporting(E_ALL);
error_reporting(0);
$logerrorstotext = '';
$logerrorstotext.= 'Error: ' . __FILE__ . "\n";
$logerrorstotext.= 'Line: ' . __LINE__ . "\n";
$logerrorstotext.= 'When: ' . date('D F j Y H:i') . "\n";
$logerrorstotext.= "---------------------------------------------------------------\n";
error_log($logerrorstotext, 3, 'errors.txt');
To write the error to my own text file which works but only shows up an error for this line:
$logerrorstotext.= 'Line: ' . __LINE__ . "\n";
Huh????
Is this a Windows thing???
Help.