PHP Warning: functions.php

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

PHP Warning: functions.php

Postby Mag » Fri May 18, 2012 2:41 am

Hi,
I used:
phpBB_SEO-3.0.10 - Advanced - 0.7.0

I got this bug report.
Code: Select all
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4920: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3876)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4921: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3876)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4922: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3876)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4923: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3876)


/includes/functions.php on line 4920-4921-4922-4923:
Code: Select all
   header('Content-type: text/html; charset=UTF-8');
   header('Cache-Control: private, no-cache="set-cookie"');
   header('Expires: 0');
   header('Pragma: no-cache');
   //Begin: Profile Fields Control MOD


and
/includes/functions.php:3876:
Code: Select all
            echo '<b>[phpBB Debug] ' . $error_name . '</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";



Thank you for answers and help
Mag
 
Posts: 18
Joined: Sun May 29, 2011 9:00 am

Advertisement

Re: PHP Warning: functions.php

Postby HB » Tue May 22, 2012 4:33 pm

Long answer: The "echo" begins the generation of the body of HTML; once that's started, you can't add to the header. That's because generating the first line of the body implicitly invokes the immediate generation of the header content. You should rework your code such that the header content is defined before generating the body.

Short answer: It's just debug output. Do you have debugging enabled in config.php? If so, turn it off in production.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1504
Joined: Mon Oct 16, 2006 2:25 am

Re: PHP Warning: functions.php

Postby Mag » Tue May 22, 2012 7:11 pm

Thank you for replay.

I understand. you're right. I changed the config file in this way;
Code: Select all
@define('PHPBB_INSTALLED', true);
@define('DEBUG', true);
@define('DEBUG_EXTRA', true);


Because; I installed "debug_errors_and_notices_v1.2.0".

I thought the overall error.Understood that the file has been changing.

Sorry for my bad english.Thank you for taking the time :)
Mag
 
Posts: 18
Joined: Sun May 29, 2011 9:00 am


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Google Adsense [Bot] and 6 guests