Re: [PHP] Error reporting at runtime

2003-06-25 Thread Robert Cummings
This is hardly perfect since it shows all errors, but it works for me:

ini_set( 'display_errors',   1 );
ini_set( 'log_errors',   1 );
ini_set( 'error_reporting', -1 );


Anthony wrote:
 
 I have error reporting turned off in my php.ini file on my production
 server.  I have an app I'm writing that I need to run on the same server (no
 one can see it though).  Anyway.  I want to turn on error reporting during
 runtime for this particular app while I'm debugging it.  so I put
 error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); in the script,
 but I don;t see any warnings.  I also tried error_reporting(2047); or
 error_reporting(8);  still nothing.  To sest it, I tried to echo some random
 variable that doesn't exist in the very next line, but no warning about it.
 So what gives?  What am I doing wrong?  Basicaly I want the same effect as
 if I had error_reporting  =  E_ALL set in php.ini.
 
 - Anthony
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Error reporting at runtime

2003-06-25 Thread Ford, Mike [LSS]
 -Original Message-
 From: Anthony [mailto:[EMAIL PROTECTED]
 Sent: 25 June 2003 12:36
 
 I have error reporting turned off in my php.ini file on my production
 server.  I have an app I'm writing that I need to run on the 
 same server (no
 one can see it though).  Anyway.  I want to turn on error 
 reporting during
 runtime for this particular app while I'm debugging it.  so I put
 error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); 
 in the script,
 but I don;t see any warnings.  I also tried error_reporting(2047); or
 error_reporting(8);  still nothing.  To sest it, I tried to 
 echo some random
 variable that doesn't exist in the very next line, but no 
 warning about it.
 So what gives?  What am I doing wrong?  Basicaly I want the 
 same effect as
 if I had error_reporting  =  E_ALL set in php.ini.

Well, that would be error_reporting(E_ALL);

Do you also have display_error turned Off in php.ini?  If so, this
suppresses all error from the output, regardless of the error_reporting
level -- you'll need to turn it back on as well using
ini_set('display_errors', '1');.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Error reporting at runtime

2003-06-25 Thread Anthony
Thanks.  That did the trick.  According to a post from Mike Ford, it was
ini_set( 'display_errors', 1 ); that was messing me up.  I have
display_error turrned off in php.ini too, so even though my reporting was
on, nothing was sent to the browser.  Thanks for the help guys :)

- Anthony


Robert Cummings [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 This is hardly perfect since it shows all errors, but it works for me:

 ini_set( 'display_errors',   1 );
 ini_set( 'log_errors',   1 );
 ini_set( 'error_reporting', -1 );


 Anthony wrote:
 
  I have error reporting turned off in my php.ini file on my production
  server.  I have an app I'm writing that I need to run on the same server
(no
  one can see it though).  Anyway.  I want to turn on error reporting
during
  runtime for this particular app while I'm debugging it.  so I put
  error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); in the
script,
  but I don;t see any warnings.  I also tried error_reporting(2047); or
  error_reporting(8);  still nothing.  To sest it, I tried to echo some
random
  variable that doesn't exist in the very next line, but no warning about
it.
  So what gives?  What am I doing wrong?  Basicaly I want the same effect
as
  if I had error_reporting  =  E_ALL set in php.ini.
 
  - Anthony
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

 --
 .-.
 | Worlds of Carnage - http://www.wocmud.org   |
 :-:
 | Come visit a world of myth and legend where |
 | fantastical creatures come to life and the  |
 | stuff of nightmares grasp for your soul.|
 `-'



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php