[pLog-svn] r6484 - plog/trunk/class/database
mark at devel.lifetype.net
mark at devel.lifetype.net
Sun May 25 23:18:26 EDT 2008
Author: mark
Date: 2008-05-25 23:18:26 -0400 (Sun, 25 May 2008)
New Revision: 6484
Modified:
plog/trunk/class/database/ltdb.class.php
Log:
Revert the change of rev. 6451 from jon. That commit cause "header already sent" message in every where.
Modified: plog/trunk/class/database/ltdb.class.php
===================================================================
--- plog/trunk/class/database/ltdb.class.php 2008-05-24 19:42:18 UTC (rev 6483)
+++ plog/trunk/class/database/ltdb.class.php 2008-05-26 03:18:26 UTC (rev 6484)
@@ -76,26 +76,20 @@
$dbcharset = $fileConfig->getValue( "db_character_set", DEFAULT_DATABASE_CHARSET );
$dbpersistent = $fileConfig->getValue( "db_persistent" );
if($dbpersistent == true) {
- ob_start();
if( !$db->PConnect( $host, $username, $password, $dbname, $dbcharset )) {
- // some hosts don't allow persistent connections, just retry
- // with a regular connect, and avoid an error message
- if( !$db->Connect( $host, $username, $password, $dbname, $dbcharset )) {
- $message = "Fatal error: could not connect to the database!".
- " Error: ".$db->ErrorMsg().ob_get_clean();
- throw( new Exception( $message ));
- }
- }
- ob_end_flush();
+ $message = "Fatal error: could not connect to the database!".
+ " Error: ".$db->ErrorMsg();
+ throw( new Exception( $message ));
+ die();
+ }
}
else {
- ob_start();
if( !$db->Connect( $host, $username, $password, $dbname, $dbcharset )) {
$message = "Fatal error: could not connect to the database!".
- " Error: ".$db->ErrorMsg().ob_get_clean();
+ " Error: ".$db->ErrorMsg();
throw( new Exception( $message ));
+ die();
}
- ob_end_flush();
}
// pass the options to the driver, if any
More information about the pLog-svn
mailing list