Page 1 of 1

Undefined variable: portal_config

Posted: 23. February 2010 18:54
by Dave6187
Your Portal Version: 1.0.5
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
Boardlink: http://forums.ridethevibe.net

PHP Version: 3.0.6

What have you done before the problem was there?
All I did was enable "debug mode" in the phpbb3 config file to see if there were any problems, only thing i've changed is integrate in gallery2, but I don't know when this problem actually started. with debug mode turned off, I have no problems

What have you already tryed to solve the problem?
ask on a couple boards

Description and Message
Alright, like I said I haven't been having any problems with my board(other than my avatars...), until I turned on "debug mode" in the phpbb config file just to check and see if there were any problems. now at the top of every page I get:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4103: Undefined variable: portal_config
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4194: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3480)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4196: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3480)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4197: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3480)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4198: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3480)

and my formatting is all messed up. If I turn debug mode back off, all goes away. Any ideas?[/i]

Re: Undefined variable: portal_config

Posted: 23. February 2010 20:22
by Huor
for the portal_config log message i would look if you have setup the portal here correctly.

in your functions.php file there should be such an entry:

Code: Select all

	$user->add_lang(array('mods/lang_portal', 'mods/additional_blocks'));
	if (!function_exists('obtain_portal_config'))
	{
		include($phpbb_root_path . 'portal/includes/functions.' . $phpEx);
	}
	if(sql_table_exists(PORTAL_CONFIG_TABLE) == true)
	{
		$portal_config = obtain_portal_config();
	}
for the rest i am not sure. there is a line entry in the log file that should give you a hint to look for. the alignment of the font gets out of order due to the error messages as the code is not parsed by php until the end. there is somewhere a return when logging is activated and errors are found.

if you get rid of the first log entry i am sure you also get rid of the rest - i assume they have something to do with each other.

Re: Undefined variable: portal_config

Posted: 23. February 2010 20:46
by Dave6187
hey thanks! that fixed it. that must've gotten messed up when I was working on integrating gallery2 into the board...

I added that line into the functions.php, and all the errors went away...

Re: Undefined variable: portal_config

Posted: 23. February 2010 22:50
by Huor
yw - glad it worked :)