Skip to Content.
Sympa Menu

freetds - [freetds] Handling TDS errors from PHP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Николай Кудрявцев <n.kudriavtsev AT mcruises.ru>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Handling TDS errors from PHP
  • Date: Thu, 24 May 2012 14:32:37 +0400

Hello.

Is there any way to handle TDS errors from PHP code?

Here's what I'm trying to do: I'm working on user authorization using MsSql database login and password. The same login that is used to connect to MsSql database. Currently I'm just connecting to database and checking if the connection worked. If credentials are correct, everything works fine. But, if either login of password is wrong, my PDO connection just dies with this error:
FreeTDS: db-lib: exiting because client error handler returned INT_EXIT for msgno 20002
And that also crashes my php session.

Is there any way I can implement that client error handler on my PHP side, or it should had already been dealt by PDO_DBLIB?



  • [freetds] Handling TDS errors from PHP, Николай Кудрявцев, 05/24/2012

Archive powered by MHonArc 2.6.24.

Top of Page