mChat help

If you wish to post tutorials or need help with any web programming language that isnt listed above then please post them in here.
2 posts Page 1 of 1
Contributors
User avatar
code it
VIP - Site Partner
VIP - Site Partner
Posts: 821
Joined: Sun Oct 10, 2010 3:02 pm

mChat help
code it
I tried to install mChat and then when I go to admin panel it gives me this error
// BEGIN mChat Mod $lang = array_merge($lang, array( // Prune Feature 'LOG_MCHAT_TABLE_PRUNED' => 'mChat Table was pruned', 'ACP_USER_MCHAT' => 'mChat Settings', 'LOG_DELETED_MCHAT' => 'Deleted mChat message
» %1$s', 'LOG_EDITED_MCHAT' => 'Edited mChat message
» %1$s', )); // END mChat Mod[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4752: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/acp/common.php:761)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4754: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/acp/common.php:761)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4755: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/acp/common.php:761)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/language/en/acp/common.php:761)
Please help
User avatar
visualtech
VIP - Donator
VIP - Donator
Posts: 265
Joined: Sat Nov 19, 2011 2:19 pm

Re: mChat help
visualtech
Okay, not sure if you'll get what I want to say, but I'll give it a shop.

Before sending pages/data, every webserver, sends a HEAD or header which looks like this:
Code: Select all
HTTP/1.0 
Content-type: text/html
X-Powered-By: apache2.2
...
Now, when you use the following PHP function:
Code: Select all
session_start();
It sends the headers again which contains the session details. You (can) later use this session cache to store variables.

Now, the problem with this function is that you'll get the error (which you are getting), if you use
Code: Select all
session_start()
twice or you use the
Code: Select all
header()
function (which is used to set the HTTP headers manually), you try to re-write the HTTP headers, which is not possible; this results in the aforementioned error.

So, it basically means that if the script is calling any function(s) related to sending/writing headers twice, it'll throw that exception; to resolve this, the quick and dirty way, you can comment that line or use the following bit of code:
Code: Select all
if (!headers_sent()) {
  // .... code ....
}
Hope it helps. If not, you can try a fresh install with a different version, check your file permissions, or if you don't plan to change the version, it might be a programming bug, so you have only one way out: use another version; it won't hurt. Also, you can change the PHP_INI files to suit your needs, or you can post a ticket in the phpBB help section.

--
Cheers! :)
Image
2 posts Page 1 of 1
Return to “Other Languages”