Guest User

Untitled

a guest
Oct 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. <?php
  2.  
  3. include "config.inc.php";
  4.  
  5. function DBConnFactory()
  6. {
  7. return new PDO($dsn='odbc:Driver={SQL Server};Server='.DB_INST.';Database='.DB_DATABASE.';APP=WhatsMyAppAgain;Trusted_Connection='.DB_TRUST);
  8. }
  9. try
  10. {
  11. $db=DBConnFactory();
  12. }
  13. catch (Exception $e)
  14. {
  15. error_log($e->getMessage().' in '.$e->getFile().', on line '.$e->getLine());
  16. die('Can't connect to the database!');
  17. }
  18.  
  19. $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
  20.  
  21. // leave the ending tag off, otherwise you could get
  22. // random whitespace that could block header changes.
  23.  
  24. [19-Oct-2018 17:38:42 Australia/Sydney] SQLSTATE[] SQLDriverConnect: 0 in C:inetpubwwwrootWhatsMyAppAgainLIVEdbconn.inc.php, on line 10
  25. [19-Oct-2018 17:38:43 Australia/Sydney] SQLSTATE[] SQLDriverConnect: 0 in C:inetpubwwwrootWhatsMyAppAgainLIVEdbconn.inc.php, on line 10
  26. [19-Oct-2018 17:39:10 Australia/Sydney] SQLSTATE[] SQLDriverConnect: 0 in C:inetpubwwwrootWhatsMyAppAgainLIVEdbconn.inc.php, on line 10
  27. [19-Oct-2018 17:44:28 Australia/Sydney] SQLSTATE[] SQLDriverConnect: 0 in C:inetpubwwwrootWhatsMyAppAgainLIVEdbconn.inc.php, on line 10
  28. [19-Oct-2018 17:45:13 Australia/Sydney] SQLSTATE[] SQLDriverConnect: 0 in C:inetpubwwwrootWhatsMyAppAgainLIVEdbconn.inc.php, on line 10
  29. [19-Oct-2018 17:46:15 Australia/Sydney] SQLSTATE[] SQLDriverConnect: 0 in C:inetpubwwwrootWhatsMyAppAgainLIVEdbconn.inc.php, on line 10
  30. [19-Oct-2018 17:48:25 Australia/Sydney] SQLSTATE[] SQLDriverConnect: 0 in C:inetpubwwwrootWhatsMyAppAgainLIVEdbconn.inc.php, on line 10
Add Comment
Please, Sign In to add comment