Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modding trouble on phpbb forums

Status
Not open for further replies.

electronicsfreak

Technical User
Sep 2, 2004
2,509
US
Ok, I have been having trouble left and right trying to install mods on my site. Well, me and my partner both have. I am pretty sure its something we are doing wrong, but I can not figure out what.

I am not new to webpages, however, I am new to php. I have recently just tried installing mchat mod for the forum on our site. However I get this error when I go to run the install file it ask us to run.

Code:
// BEGIN mChat Mod $lang = array_merge($lang, array( 'MCHAT' => 'Chat', 'MCHAT_COPYRIGHT' => '© Blood Brothers', )); // END mChat Mod [phpBB Debug] PHP Notice: in file /includes/functions.php on line 4208: Undefined index: mchat_enable
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4289: Cannot modify header information - headers already sent by (output started at /language/en/common.php:8)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4291: Cannot modify header information - headers already sent by (output started at /language/en/common.php:8)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4292: Cannot modify header information - headers already sent by (output started at /language/en/common.php:8)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4293: Cannot modify header information - headers already sent by (output started at /language/en/common.php:8)


If need be, I can copy the code from the file or files you request. Thanks

There is a point in wisdom and knowledge that when you reach it, you exceed what is considered possible - Jason Schoon
 
this is related to some clumsy coding in phpbb and to an incorrect security setting in your production website.

turn error reporting to E_ALL & ~E_NOTICE in php.ini. don't forget to restart the webserver afterwards.
 
I can not find the specified file you mentioned. We are using godaddy as the host. Where would it be located?

There is a point in wisdom and knowledge that when you reach it, you exceed what is considered possible - Jason Schoon
 
read up on php directives in the manual.

you can also change the error reporting at runtime with error_reporting()
 
I had a similar problem, remove all white space in the code. The top line should be <?
no html or empty lines above it and it will work.

If you can't stand behind your troops, stand in front of them.
Semper Fidelis

Jim
 
jpadie - I have been trying to learn a few things as I am doing this as I go, but it takes a while. Exactly what manual are you referring to? Also, what file am I supposed to change this error code on?



jdhilljr - I tried the space removing you suggested, that did not work. Any other suggestions?


Thanks

There is a point in wisdom and knowledge that when you reach it, you exceed what is considered possible - Jason Schoon
 
the space is not relevant in this case. the issue is caused by php raising a notice and thus creating output. once output is created the server cannot send further headers, hence the rest of the notices

the manual : php.net. php benefits from having quite probably the best documentation of any language.

if you wish to change error reporting on a run time basis you will need to change all the script files that are statically called by your web app. if you are managing a php site it would be a terrible idea to do things this way (unless you were coding using a despatch method or phpbb specifically allowed this kind of setup). the proper way would be to modify your php.ini. if you don't have one, read up in the manual, create one and upload it or talk to your host.




 
Ah, that is the most clear answer I have gotten yet. That I like. That makes much more sense now. I remember coming across something like that, but was not sure on it. I will give that a try first chance I get, and let you know how it goes.


Thanks!

There is a point in wisdom and knowledge that when you reach it, you exceed what is considered possible - Jason Schoon
 
if you are using apache you could also add the directive in a local .htaccess file

Code:
php_admin_value error_reporting 504

this turns on warnings and above (in levels of serverity)
 
Ok, I found a php.ini file and am trying to learn it as I go. We got a new error now.


// BEGIN mChat Mod $lang = array_merge($lang, array( 'MCHAT' => 'Chat', 'MCHAT_COPYRIGHT' => '© Blood Brothers', )); // END mChat Mod // BEGIN mChat Mod $lang = array_merge($lang, array( 'MCHAT' => 'Chat', 'MCHAT_COPYRIGHT' => '© phpBB3BBCodes.com', )); // END mChat Mod

Any suggestions?

There is a point in wisdom and knowledge that when you reach it, you exceed what is considered possible - Jason Schoon
 
This shows up at the top of the page when you go to login.


Code:
// BEGIN mChat Mod $lang = array_merge($lang, array( 'MCHAT' => 'Chat', 'MCHAT_COPYRIGHT' => '© Blood Brothers', )); // END mChat Mod // BEGIN mChat Mod $lang = array_merge($lang, array( 'MCHAT' => 'Chat', 'MCHAT_COPYRIGHT' => '© phpBB3BBCodes.com', )); // END mChat Mod

There is a point in wisdom and knowledge that when you reach it, you exceed what is considered possible - Jason Schoon
 
that's not an error message. that will be appearing because you are somewhere echoing/printing this information to screen.

I would guess this is because the bit of code is outside the php start/close tags.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top