[pLog-svn] r6484 - plog/trunk/class/database

Jon Daley plogworld at jon.limedaley.com
Mon May 26 10:32:21 EDT 2008


 	Is this on windows?  Maybe the ob_flush is broken on windows.  You 
shouldn't see any errors unless the database can't be opened.
 	What is the exact error message - ie. what line is causing the 
output?

On Sun, 25 May 2008, mark at devel.lifetype.net wrote:

> 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
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

This problem will take an infinite amount of time.  This doesn't
seem very feasible, since we don't have an infinite amount of time.
In fact, we have less than a month.
-- Professor Tygar


More information about the pLog-svn mailing list