• 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

Error message:

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

Post a reply
11 posts • Page 1 of 1

Postby Dusty P » Fri Dec 22, 2006 5:50 am

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/.../chat/src/phpfreechat.class.php:1) in /hsphere/local/home/.../chat/src/phpfreechatconfig.class.php on line 98

line 98: if(session_id() == "") session_start();


OK, what's wrong?
Last edited by Dusty P on Fri Dec 22, 2006 5:56 am, edited 1 time in total.
Dusty P
New member
 
Posts: 6
Joined: Fri Dec 22, 2006 5:21 am
Top

Postby mikez » Fri Dec 22, 2006 4:54 pm

Without knowing more about your code, I can tell you that anything that is sent to your browser to output (i.e. headers, or any characters like spaces or html tags) **before** line 98 appears will throw the error you described. You need to make sure nothing is sent to the browser for output prior to calling session_start.

Sometimes php errors will be displayed during runtime, which constitutes browser output, and will cause this error.
mikez
Member
 
Posts: 29
Joined: Wed Dec 13, 2006 1:24 am
Top

Postby Dusty P » Sun Dec 24, 2006 7:33 am

Here's my page:

<?php
require_once "chat/src/phpfreechat.class.php"; // adjust to your own path
$params["serverid"] = md5(__FILE__);
$params["refresh_delay"] = 2000; // 2000ms = 2s
$chat = new phpFreeChat($params);
?>

<?php
$pagetitle = 'other';
?>

<?php
include('includes/top.php');
?>

<p><b>Chat Room</b></p>

<?php $chat->printChat(); ?>

</div>

<?php
include('includes/bottom.php');
?>
Dusty P
New member
 
Posts: 6
Joined: Fri Dec 22, 2006 5:21 am
Top

Postby Dusty P » Wed Dec 27, 2006 5:26 pm

I'm afraid I had to give a low rating on Hotscripts and a poor member review on this program.

I think you have a good idea with PhpFreeChat but it needs work, especially in the user friendly department.

The key to any good program is to have well written instructions that are easy to follow and understand. I think you fell short of this with PhpFreeChat.

Also, you should have an HTML form that asks for the specific details to properly configure the program to the user's system and automatically generate a configuration file. This will help prevent problems from people having to physically alter files themselves.

You use session_start, which for me has returned error messages. Did you intended for PhpFreeChat to be a stand alone program and not integrated into an already functioning website?

A functioning website will have it's own headings. How did you intend for my website headings to successfully interact with PhpFreeChat's headings?

We see now the importance of a well written set of instructions and perhaps an HTML form to configure the program to successfully integrate into an existing website.

D.P.
Dusty P
New member
 
Posts: 6
Joined: Fri Dec 22, 2006 5:21 am
Top

Postby mikez » Wed Dec 27, 2006 7:01 pm

With all due respect, rather than complain about what it lacks, why not offer to contribute to make it even better? Others have contributed some handy-dandy upgrades, like the shared memory and MySQL containers.

Kerphi has gone above and beyond with this chat application. Of course something this sophisticated is not going to run perfectly across all operating systems, browsers, and platforms. But guess what? He's in here supporting his work when I'm sure he has far better things to do with his time.


Mike
mikez
Member
 
Posts: 29
Joined: Wed Dec 13, 2006 1:24 am
Top

Postby Dusty P » Sat Jan 06, 2007 8:02 pm

I will be more than happy to contribute what I can to help make PhpFreeChat a better program.

Pointing out the problems - helps. And being here pointing out the problems is helping to support Kerphi's work - my time is also valuable. If I invested as much time in something as this person did with PhPFreeChat I would like to know the problems so I could fix them to make the program better.

I could have just deleted the program and went about my business and not look back. But I think PhPFreeChat is a good idea and I would like to see it do better.

I'm not a top-notched code writer so I can't offer any help in that department. But as an average user and web developer I can offer suggestions on how to make it more user friendly and ideas to help make it work better out of the box - for the average user.

I thought I offered a good suggestion in my last post about adding a user form so that people could enter in their particulars and the program would automatically generate a config file that could be used in the installation. Similar to that which PhPBB2 uses.

I understand that all programs will need tweaking to specific user operating systems, browsers, and platforms. But, the overwhelming majority of people use Windows OS and Internet Explorer as their browser and most platform's will either be Linux or Unix. I would design a program to operate under these assumptions and offer well written instructions for other configurations.

Also, I well written set of instructions is needed - period. If I could figure out how to get this program to work then I would write the instructions myself. And I will figure it out eventually when I can find the time.

I think the default colors of PhPFreeChat should be basic white than this florescent green. Then it could be incorporated into an existing web page more easily.

Speaking of incorporating PhPFreeChat into an existing website, what about my initial problem with the session start?

If I've had this problem then others have had or will have it as well. They might not come here to seek a solution, but just toss it out and go look for another chat program.

Maybe Kerphi could address this in the installation document. Maybe using ob_start() at the top of the web page or something similar would help.

D.P.
Dusty P
New member
 
Posts: 6
Joined: Fri Dec 22, 2006 5:21 am
Top

Postby phpfreechat » Sat Jan 06, 2007 10:40 pm

I think the default colors of PhPFreeChat should be basic white than this florescent green. Then it could be incorporated into an existing web page more easily.

I think you are speaking about the 0.x versions.
I corrected this point in the lastest 1.x version (still in beta).
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Dusty P » Sun Jan 07, 2007 12:26 am

Ok, I put <?php $chat->printChat(); ?> in my web page's main column and this in the head tags:

<link rel="stylesheet" title="classic" type="text/css" href="style/content.css" />
<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>

and this at top of page:

<?php

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = "guest".rand(1,1000); // setup the intitial nickname
$params["isadmin"] = true; // just for debug ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$chat = new phpFreeChat( $params );
?>

I don't need all the stuff in the left column.

This got me a chat working on my computer. I haven't had anyone else try to use it yet so I don't know if it's working completely.

I didn't use the index.php file that came with phpfreechat-1.0-beta8.

The problem with this set up is that I can't wipe out the previous entries and start with a fresh window. So all my testing inputs show up in the window.
Last edited by Dusty P on Sun Jan 07, 2007 1:02 am, edited 1 time in total.
Dusty P
New member
 
Posts: 6
Joined: Fri Dec 22, 2006 5:21 am
Top

Postby phpfreechat » Sun Jan 07, 2007 1:31 am

If you don't want messages history, try to add this parameter :
$params["max_msg"] = 0;

(don't forget to rehash the chat)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Dusty P » Sun Jan 07, 2007 6:59 am

I put $params["max_msg"] = 0; above the head tags. I'm not sure what rehash means, but I refreshed the page and all the previous entries are still there.
Dusty P
New member
 
Posts: 6
Joined: Fri Dec 22, 2006 5:21 am
Top

Postby DarkOmega » Sun Jan 07, 2007 10:09 am

Dusty P wrote:I put $params["max_msg"] = 0; above the head tags. I'm not sure what rehash means, but I refreshed the page and all the previous entries are still there.

Didn't you just complain about a set of well written instructions and lecture everyone on how PHP Free Chat should be? Maybe you should try reading the basic instructions first before you go off on another rant, and then go from there.

This will tell you how to rehash
http://www.phpfreechat.net/faq.en.html

Also see:
http://www.phpfreechat.net/install.en.html
http://www.phpfreechat.net/customize.en.html
http://www.phpfreechat.net/requiredconfig.en.html

Dusty P wrote:The problem with this set up is that I can't wipe out the previous entries and start with a fresh window. So all my testing inputs show up in the window.

There are a couple of suggestions to solve this which a simple search will show you. One of these you have applied but once again forgot to read the instructions on how to /rehash. While you are at it look up "clearing cache" and "admin login" as well.

Finally I would like to point out that there is a BIG difference between constructive criticism and ranting about how you cant get it to work the way you want it to. Using low review this and that blah blah blah to get someone to do it for you(this is not a contribution or Help). A Contribution (just for example) would be writing those instructions yourself (asking questions if you need help), and offering them to this project instead of complaining that it hasn’t been done yet. People here DONATE their time to support this FREE program, so ranting about its completion or complaining that it doesn’t work properly "Out of the Box" is not welcome. Furthermore most people find this easy enough to install with the information provided to them. A "Web Developer" should have no problem installing this in a functioning website with it's own headings. I know your time is valuable every person you will ever speak to will say their time is valuable to them, who's isn’t? So instead of wasting that valuable time of yours writing huge page long posts that will irritate people, why not just spend that valuable time writing a page long instruction for others who may come across the same problem?
Last edited by DarkOmega on Sun Jan 07, 2007 9:05 pm, edited 1 time in total.
DarkOmega
Member
 
Posts: 20
Joined: Tue Jan 02, 2007 1:06 pm
Location: Averill Park, NY
  • Website
Top


Post a reply
11 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 3 guests

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