• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

How to integrate the chat in website

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
12 posts • Page 1 of 1

Postby Bulqr4eto » Fri Jul 09, 2010 2:51 pm

Hi all, Im sorry for the stuped question but from 1 month Im trying to integrate this AWESOME chat in my website but everytime I try I get errors... for example

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at

or Warning: require_once(/usr/local/apache2/htdocs/rado/cstrike/site/NEW/demo32_show_last_messages-config.php) [function.require-once]: failed to open stream: No such file or directory in

Iv readed the hole site and forum and I didnt found a solution... can someone give me a link or tutorial for how to integrate the chat ... I tryed the demos with include or something but doesnt work :( .Thanks
Bulqr4eto
New member
 
Posts: 3
Joined: Fri Jul 09, 2010 2:46 pm
Top

Postby todhend » Fri Jul 09, 2010 5:32 pm

put this at the top of every file compalining of this just below the php like so, it will not work otherwise the issue is your script has already cached another session, this might stop the cach

<?php
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');


some servers with high error reporting might need this line also

ini_set("display_errors", 0);
http://nflpick.net free football picks
http://tdah.us free webmail script
todhend
Member
 
Posts: 83
Joined: Tue Jan 19, 2010 9:03 pm
Location: Missouri
  • Website
Top

Postby OldWolf » Thu Aug 12, 2010 6:47 am

I've been away, did you get a solution to this?
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Mike_Torello » Thu Aug 19, 2010 10:32 pm

Have same problem here, I configured index.php and now I need to import it in html document, even looked and tryed to copy source from page that it has integrated but seems that I cant make it work, I know i'm missing something but cah't figure out what?

Thank you
Mike_Torello
New member
 
Posts: 4
Joined: Thu Aug 19, 2010 10:27 pm
Top

Postby jimmo » Thu Aug 19, 2010 10:52 pm

The original post contains both the problem and the answer. PHP's session_start() function typically causes headers to be output and so session_start() must be called before any headers or html output. (It even tells you in the error, where it says "headers already sent").

So, if that's the error you're getting, that's likely to be the problem :)
jimmo
Member
 
Posts: 23
Joined: Wed Aug 18, 2010 3:51 pm
Top

Postby OldWolf » Fri Aug 20, 2010 12:44 am

So just to be clear, when you look in the index.php file that you're copying from, the first chunk of php code needs to come before ANY output from the website. The second chunk goes where you want the chat to appear.

Hope that helps!
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Mike_Torello » Fri Aug 20, 2010 11:13 am

I'm not shore...

this is what I want:
https://www.snipercentral.com/chat/

and this is what I have:
http://www.hr-oruzje.org/phpfreechat-1.3/index.php

standalone version that works fine and now I want to integrate it to a page to look like chat on link above, I tryed that with php chunk on the top of the document, I tryed to put it whole in table, even tryed to copy pieces of source code from that web page on first link but still no luck. Besides that if I put the code from php document administrator passwords will be visible to anyone who looks to page source and I don't want that. On the first link I looked for PHP chunks that looked like mine but got confused at the end...

http://www.hr-oruzje.org/index2.html - this was my try with chunk on top...
http://www.hr-oruzje.org/index3.html - all code in one table (allmost same result as link above)
http://www.hr-oruzje.org/index4.html - this is so far best try, made with copying some of src code form sniper central page, but still doesn't work but even if it worked somehow, I wouldnt know why is now working anyway.

Please tell me what I'm missing here, I suppose I don't see something obvious but I'm blind here from trying...

Can you help me please?
Mike_Torello
New member
 
Posts: 4
Joined: Thu Aug 19, 2010 10:27 pm
Top

Postby Mike_Torello » Sun Aug 22, 2010 11:05 am

Ok, I found someone who made chat to work =) it's excellent now, thanx anyway for making great chat =)
Mike_Torello
New member
 
Posts: 4
Joined: Thu Aug 19, 2010 10:27 pm
Top

Postby peppi » Tue Oct 26, 2010 12:47 am

Mike_Torello wrote:Ok, I found someone who made chat to work =) it's excellent now, thanx anyway for making great chat =)

nice that you found the solution
a shame that you did not post it here
grrrrrrrrrrrrr
peppi
Member
 
Posts: 16
Joined: Mon Oct 25, 2010 9:48 pm
Top

Postby Mike_Torello » Tue Oct 26, 2010 8:45 am

Man who made it work didn't tell me much what was wrong, he only made it work, one thing I learned it has to be *.php to work, not *.html... that was the mistake I was doing, he checked it, said that it's was okay, changed extension, tweaked some minor details about positioning table in the document...

http://www.hr-oruzje.org/chat.php
as you can see, it's working now...

Hope it helps somehow...

One more thing, might be usefull, because it has to be PHP extension, you CAN'T make it index.php to be your homepage because some servers can't work with index.php instead index.html as homepage... So, if you want it on your webpage, make regular index.html and link to chat.php
Mike_Torello
New member
 
Posts: 4
Joined: Thu Aug 19, 2010 10:27 pm
Top

Postby peppi » Tue Oct 26, 2010 3:22 pm

this how far i got it
but it still looks shitty

</head>

<body bgcolor="#000000">

<div style="position: absolute; width: 1009px; height: 753px; z-index: 1; left: 124px; top: 19px" id="laag1">
<iframe name="I1" src="../index.php" width="1029" height="676">
De browser ondersteunt geen in line frames of is momenteel zodanig geconfigureerd dat in line frames niet kunnen worden weergegeven.
</iframe></div>


</body></html>


you must edit this txt according to your server and dir settings

" src="../index.php"

for me the html file was located in dir xxxx
peppi
Member
 
Posts: 16
Joined: Mon Oct 25, 2010 9:48 pm
Top

Postby waiheke » Wed Oct 27, 2010 3:48 pm

This thread is about styling
You're talking about the header

Think of the whole chat box as one element, one particlar block of code that you are going to postion on the page
Then every other element - the header at the top, the footer at the bottom - needs to be controlled by css

Google css and div's
waiheke
Member
 
Posts: 126
Joined: Sun Sep 12, 2010 4:33 pm
Top


Post a reply
12 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 22 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub