Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: [PHP-DB] DB dont_die and errors
You should be able to comment out the error message portions that you don't
want to display

bastien

>From: Alessandro Pasotti <ale.pas@tiscali.it>
>Reply-To: alessandro@acqualba.it
>To: php-db@lists.php.net
>Subject: [PHP-DB] DB dont_die and errors
>Date: Thu, 26 May 2005 18:58:07 +0200
>
>Hi all,
>
>When the connection fails, the default behaviour is to die, printing also
>the
>dns, with user and password!!!
>
>How can I avoid this?
>
>When I set dont_die, it goes on but the script stops later with a fatal
>error
>(since DB is not initialized).
>
>Does anybody knows a graceful way to handle connection errors.
>
>I'm using DBDataObject to do all the DB stuff but the internals of this
>class
>don't check for PEAR errors after calling connect(), should I subclass it
>and
>rewrite some methods?
>
>Bye.
>--
>Alessandro Pasotti
>ICQ# 245871392
>Linux User #167502
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

Report this thread to moderator Post Follow-up to this message
Old Post
Bastien Koert
05-28-05 01:55 AM


Re: [PHP-DB] DB dont_die and errors
Il 23:15, venerd=EC 27 maggio 2005, Bastien Koert ha scritto:
> You should be able to comment out the error message portions that you don=
't
> want to display
>

I'm not sure I understand you, are you suggesting to modify DB.php code to=
=20
change the way it process error messages?

If yes, I don't believe it'a good idea, I don't want to change PEAR code,=20
there must be a way to configure PEAR error to handle connection errors=20
without dying and without printing DB authentication information to the=20
browser.

If checking for a valid connection _before_ going through DBDataObject to=20
retrieve DB data is the only way, it introduces some overload (since every=
=20
script must check for connection before proceeding), but I feel it's a bett=
er=20
way than changing PEAR code directly.


BTW, thanks for your hints.


 

=2D-=20
Alessandro Pasotti
ICQ# 245871392
Linux User #167502

Report this thread to moderator Post Follow-up to this message
Old Post
Alessandro Pasotti
05-28-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:38 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.