Posted on: 09/23/03 04:43am
By: ScurvyDawg
Someone over at Squatty asked about integrating GL with PHPMyChat. Now I am no real programmer but I have been giving it a go. I seem to having issues with Cookies coliding somehow and I know not why.
Here is a link to the working url
http://chat.scurvydawg.com/
As you can see GL has wrapped the PHPMychat box but got these errors.
Warning: Cannot modify header information - headers already sent by (output started at /home/jhklim/public_html/lib-common.php(904) : eval()\'d code:9) in /home/jhklim/public_html/chat/chat/localization/languages.lib.php3 on line 70
Warning: Cannot modify header information - headers already sent by (output started at /home/jhklim/public_html/lib-common.php(904) : eval()\'d code:9) in /home/jhklim/public_html/chat/chat/lib/index.lib.php3 on line 76
Warning: Cannot modify header information - headers already sent by (output started at /home/jhklim/public_html/lib-common.php(904) : eval()\'d code:9) in /home/jhklim/public_html/chat/chat/lib/index.lib.php3 on line 77
Warning: Cannot modify header information - headers already sent by (output started at /home/jhklim/public_html/lib-common.php(904) : eval()\'d code:9) in /home/jhklim/public_html/chat/chat/lib/index.lib.php3 on line 78
Warning: Cannot modify header information - headers already sent by (output started at /home/jhklim/public_html/lib-common.php(904) : eval()\'d code:9) in /home/jhklim/public_html/chat/chat/lib/index.lib.php3 on line 79
Warning: Cannot modify header information - headers already sent by (output started at /home/jhklim/public_html/lib-common.php(904) : eval()\'d code:9) in /home/jhklim/public_html/chat/chat/lib/index.lib.php3 on line 80
Now I think it has something to with the file mentioned in the first error as the line it refers to is all about setting cookies.
What is it about these two cookies that cause it to break??
Ideas Tips and comments are welcome.
Re:PHPMyChat and GeekLog
Posted on: 09/23/03 11:13am
By: DTrumbower
Usually errors like this are caused by extra spaces or lines at the end of the file.
Re:PHPMyChat and GeekLog
Posted on: 09/23/03 01:04pm
By: ScurvyDawg
I wish it was that easy Dwight. Unfortunately I had the same idea last night. However I still get the errors. It seems as though GL and PHPMyChat are both placing cookies and for some reason do not like each others cookies.
Odd but thats just what it looks like to this Newb. I really have made sure there are no PHP files with spaces after the last character.
Thanks for the tip though. It made me go back and make sure thats not what it was, and I need that.
Re:PHPMyChat and GeekLog
Posted on: 09/23/03 03:20pm
By: Dirk
As for the \"eval\'d code\" message, try this:
In lib-common.php, function COM_siteHeader(), change the end of the function so that it reads
$tmp = $header->parse( \'index_header\', \'header\' );
ob_start();
eval( \'?>\' . $tmp );
$retval = ob_get_contents();
ob_end_clean();
return $retval;
}
See if that gets you any further.
Btw, in case you\'re running Gallery on your site, you will need a small fix for the Geeklog integration after the above change ...
bye, Dirk
Re:PHPMyChat and GeekLog
Posted on: 09/23/03 03:52pm
By: ScurvyDawg
I tried as you have nicely posted above Dirk, I thank you for giving it some thought.
I did however receive some strange output when doing this.
Both the OPD integration and the PHPMyChat integration worked with the above posted code, OPD is working normally anyhow, but they both then appeared Above GL rather than in it.
Strange hey?
If you want to see the output just let me know and I will re-enable it. There are no error messages it just appears above the GL wrapper rather than in it as desired.
Thank you
Re:PHPMyChat and GeekLog
Posted on: 09/23/03 04:17pm
By: Dirk
[QUOTE BY= ScurvyDawg]but they both then appeared Above GL rather than in it.
Strange hey?[/QUOTE]
Not at all. That just means that they\'re doing output directly instead of returning it (as Geeklog would require).
More or less the same code as I posted above could be used to work around that. Something like ...
$display .= COM_siteHeader();
ob_start();
// insert code for the chat script here
$display .= ob_get_contents();
ob_end_clean();
$display .= COM_siteFooter();
echo $display;
You get the idea, I\'m sure ... Look up
ob_start in the PHP manual.
bye, Dirk
Re:PHPMyChat and GeekLog
Posted on: 09/23/03 04:21pm
By: ScurvyDawg
I will read up on that right now, Thanks ever so much.
It is coming along. How exciting.
Re:PHPMyChat and GeekLog
Posted on: 09/23/03 04:56pm
By: ScurvyDawg
Wow .... I just read the info you linked to in your comment Dirk. I think I may be way over my head here.
I will keep playing but I am not sure it is looking good to go.
Thanks for everything.
PHPMyChat and GeekLog
Posted on: 01/29/04 01:31am
By: hidden
how did u do that scurvydawg? i mean the phpmychat integration thing?
PHPMyChat and GeekLog
Posted on: 01/31/04 01:25am
By: ScurvyDawg
I never got it to work. I never got past these errors unfortunately. I wish I knew, however my installation of PHPMyChat is no longer linked to from my site. It was nearly as straight forward as the DWOPD or the cafepress script. However that one had an error I was unable to resolve as well and it was another user who fixed that.
If you want email me scurvydawgATscurvydawg.com I will send you the file of PHP code I added to the phpMyChat index.
Good Luck if you have any success send me the changes you make to get it to work.
PHPMyChat and GeekLog
Posted on: 10/21/04 05:58am
By: Anonymous (Girish)
scurvydawg I got same errors, I searched on google found your msg.
Somehow I figured it out that the error is in config.lib.php3 file.
Go to the end of file and remove extra line charachters if any.