PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Error reporting

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Installation, Upgrading & Configuration
View previous topic :: View next topic  
Author Message
nmw01223



Joined: 09 May 2008
Posts: 8

PostPosted: Wed Aug 13, 2008 11:08 pm    Post subject: Error reporting Reply with quote

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
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Wed Aug 13, 2008 11:52 pm    Post subject: Reply with quote

The answer is just like your subject => "error_reporting".

But this isn't really a PEAR question ...
Back to top
View user's profile Send private message
nmw01223



Joined: 09 May 2008
Posts: 8

PostPosted: Thu Aug 14, 2008 7:31 am    Post subject: Reply with quote

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
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Thu Aug 14, 2008 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
nmw01223



Joined: 09 May 2008
Posts: 8

PostPosted: Fri Aug 15, 2008 2:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Installation, Upgrading & Configuration All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software