Search
Left Quote    I have not failed. I've just found 10,000 ways that won't work.
- Thomas Alva Edison    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: Two databases?
  This user is offline  jazzylee77
  Subject: "Two databases?" Posted: @ 3:29 am on Feb 22 2008   

Member #: 484
Rank: User - (14)
Since: 11/21/07
Posts: 14
From: Ohio

I thought I was going to install my version of the comment system on another site this evening, but I've hit a new snag. The folder I'm working in creates it's pages in part by connecting to an offsite database that I have no control over. Putting the session start and database connect stuff in the header causes the original php to try to connect and call tables from the comment database.

I've juggled around the db connect to be included in comments.php instead of the main pages headers. And I've got it mostly working except one last error after I post a comment.

Warning: Cannot modify header information - headers already sent by (output started at /myserver/local /home/user/mysi te.com/path/db_ funcs.php:91) in /myserver/local /home/user/mysi te.com/comments .php on line 68

I guess this is from the page refresh. I may just pull that part out, since I'm using this as a little content adding engine and not for user comments.

Open to suggestions.


    Viewed: 4,996 Times | Reply to This | To top
  This user is offline  jazzylee77
  Subject: "re: Two databases?" Posted: @ 4:33 am on Feb 22 2008    

Member #: 484
Rank: User - (14)
Since: 11/21/07
Posts: 14
From: Ohio

as soon as I sent this, I realized I'm the only one that will see that error. No big deal I guess. But always willing to learn a better way.




    Viewed: 4,990 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Two databases?" Posted: @ 12:50 pm on Feb 22 2008    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

use ob_start(); as the first line of your php script




-bs0d | AllSyntax.com

    Viewed: 4,978 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2017; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank