Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 04:28 pm EST
Geeklog Forums
PHPMyChat and GeekLog
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.
16
24
Quote
Status: offline
DTrumbower
Forum User
Moderator
Registered: 01/08/03
Posts: 507
Usually errors like this are caused by extra spaces or lines at the end of the file.
10
23
Quote
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.
15
21
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
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
Text Formatted Code
$tmp = $header->parse( 'index_header', 'header' );ob_start();
eval( '?>' . $tmp );
$retval = ob_get_contents();
ob_end_clean();
return $retval;
}
15
25
Quote
Status: offline
ScurvyDawg
Forum User
Full Member
Registered: 11/06/02
Posts: 523
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
17
21
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by ScurvyDawg:but they both then appeared Above GL rather than in it.
Strange hey?
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 ...
Text Formatted Code
$display .= COM_siteHeader();ob_start();
// insert code for the chat script here
$display .= ob_get_contents();
ob_end_clean();
$display .= COM_siteFooter();
echo $display;
17
19
Quote
Status: offline
ScurvyDawg
Forum User
Full Member
Registered: 11/06/02
Posts: 523
I will read up on that right now, Thanks ever so much.
It is coming along. How exciting.
24
24
Quote
Status: offline
ScurvyDawg
Forum User
Full Member
Registered: 11/06/02
Posts: 523
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.
14
16
Quote
Status: offline
ScurvyDawg
Forum User
Full Member
Registered: 11/06/02
Posts: 523
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.
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.
17
14
Quote
Girish
Anonymous
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.
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.
17
9
Quote
All times are EST. The time is now 04:28 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content