| View previous topic :: View next topic |
| Author |
Message |
nmw01223
Joined: 09 May 2008 Posts: 8
|
Posted: Wed Aug 13, 2008 11:08 pm Post subject: Error reporting |
|
|
I have just upgraded from 5.0.5 to 5.2.6 on W2000.
I notice that error reporting appears different. Previously errors were reported back to the script which could handle them, but now nothing appears reported back and blank pages result on the client browser.
What do I need to do to configure it to behave as previously? I have tried 'display_errors' both on and off with no different effect. |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Wed Aug 13, 2008 11:52 pm Post subject: |
|
|
The answer is just like your subject => "error_reporting".
But this isn't really a PEAR question ... |
|
| Back to top |
|
 |
nmw01223
Joined: 09 May 2008 Posts: 8
|
Posted: Thu Aug 14, 2008 7:31 am Post subject: |
|
|
Thanks. The reason I zsent it to Pear was that actually the function giving the problem for me is Pear Mail send().
I'm using Pear Mail SMTP, and the issue is what happens if the SMTP server doesn't respond for some reason to the send() - I can force this error by picking the wrong port number for testing. With the old PHP it would return with an error (false) that I can pick up, with the new one, it seems not to. I've tried '@' and no '@' on the function.
error_reporting is currently set to E_ALL, however. Should be everything, I assume? |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1053
|
Posted: Thu Aug 14, 2008 3:55 pm Post subject: |
|
|
Maybe you've edited the wrong php.ini file?
Anyway, usually PEAR code is "silent", i.e. you have to check for error. For debugging purposes or quick tests, I recommend to insert the following lines at the beginning of your script(s):
| Code: |
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'PEAR.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
|
|
|
| Back to top |
|
 |
nmw01223
Joined: 09 May 2008 Posts: 8
|
Posted: Fri Aug 15, 2008 2:13 pm Post subject: |
|
|
Thanks, sorted it. It was several things in combination:
Restarting IIS does not apparently cause PHP.INI to be reread after setting 'display_errors'. Needs a reboot.
Some of the errors were script timeouts - timing out before the SMTP server returned, and nothing came back then.
'display_errors' is now working as expected. |
|
| Back to top |
|
 |
|