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

Mark Wu markplace at gmail.com
Mon May 26 12:56:16 EDT 2008


Cannot modify header information - headers already send

> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net 
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> Sent: Tuesday, May 27, 2008 12:50 AM
> To: LifeType Developer List
> Subject: Re: [pLog-svn] r6484 - plog/trunk/class/database
> 
>  	What is the error message?  I ran this code and it worked fine.
> 
> On Tue, 27 May 2008, Mark Wu wrote:
> 
> > Not only windows, even Ubuntu has the same error messages.
> >
> > Mark
> >
> >> -----Original Message-----
> >> From: plog-svn-bounces at devel.lifetype.net
> >> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> >> Sent: Monday, May 26, 2008 10:32 PM
> >> To: LifeType Developer List
> >> Subject: Re: [pLog-svn] r6484 - plog/trunk/class/database
> >>
> >>  	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
> >> _______________________________________________
> >> pLog-svn mailing list
> >> pLog-svn at devel.lifetype.net
> >> http://limedaley.com/mailman/listinfo/plog-svn
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://limedaley.com/mailman/listinfo/plog-svn
> >
> 
> --
> Jon Daley
> http://jon.limedaley.com/
> 
> I pass chain letters along to all my friends. AND I VOTE!
> -- Cort Stratton
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn



More information about the pLog-svn mailing list