> -----Original Message----- > From: Chris W. Parker [mailto:[EMAIL PROTECTED] > Sent: Monday, March 19, 2007 1:57 PM > Cc: php-general@lists.php.net > Subject: RE: [PHP] Can't get PHP errors to display or log consistently > > On Friday, March 16, 2007 4:04 PM Robert Cummings > <mailto:[EMAIL PROTECTED]> said: > > Update: > > Now that I've corrected my mistake in php.ini and set the level of error > reporting that I want I can see *most* errors. > > But shouldn't the following produce a visible error? > > <?php > > error_reporting(E_ALL); > ini_set('display_errors','On'); > > x > echo 'hello'; > > ?> > > If I comment the x I see 'hello'. If I uncomment the x I don't see > anything. > > > > Thanks, > Chris.
Syntax errors like that will cause a startup error, which means your code can't be evaluated. So those 2 lines of code that turn the error reporting on never get executed. Make sure the ini file you're editing is the one PHP is actually using. You can see the path to the ini file in <? phpinfo(); ?> Also make sure you are restarting apache after editing ;) I believe .htaccess also can override your ini setting, so check for the existence of one of those too :D HTH, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php