Recent Topics

1 Nov 11, 2006 19:05    

I'm trying to modify the _main.php page of the custom skin and getting the "Cannot Modify Header Information" error. It was all working fine yesterday. Today, any edit at all causes this error. I've checked for whitespaces, can't see ANY.

I found the FAQ that mentioned that FTP and eidting programs could cause problems - but the three links to forum threads all return empty. Can anyone direct me to those old threads so I can continue troubleshooting? Thanks!

The blog is online at www.flswp.com/blog. I've edited the custom.css and _main.php files only.

2 Nov 12, 2006 09:18

Post the top 10 or so lines of your _main.php ?

¥

3 Nov 12, 2006 14:53

<?php
/**  (long comment deleted)
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

skin_content_header();	// Sets charset!
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>">
<head>
	<?php skin_content_meta(); /* Charset for static pages */ ?>
	<?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>
	<title><?php
		$Blog->disp('name', 'htmlhead');
		request_title( ' - ', '', ' - ', 'htmlhead' );
	?></title>
	<?php skin_base_tag(); /* Base URL for this skin. You need this to fix relative links! */ ?>
	<meta name="description" content="<?php $Blog->disp( 'shortdesc', 'htmlattr' ); ?>" />
	<meta name="keywords" content="<?php $Blog->disp( 'keywords', 'htmlattr' ); ?>" />
	<meta name="generator" content="b2evolution <?php echo $app_version ?>" /> <!-- Please leave this for stats -->
	<link rel="alternate" type="text/xml" title="RDF" href="<?php $Blog->disp( 'rdf_url', 'raw' ) ?>" />
	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php $Blog->disp( 'rss_url', 'raw' ) ?>" />
	<link rel="alternate" type="text/xml" title="RSS 2.0" href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" />
	<link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>" />
	<link rel="pingback" href="<?php $Blog->disp( 'pingback_url', 'raw' ) ?>" />
	<link rel="stylesheet" href="custom.css" type="text/css" />
	<?php
		$Blog->disp( 'blog_css', 'raw');
		$Blog->disp( 'user_css', 'raw');
	?>
</head>

*edit*
to add [ php][/php] tags
¥

4 Nov 12, 2006 15:28

It's this piece that I'm interested in :-

<?php
/** (long comment deleted)
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

skin_content_header(); // Sets charset!
?>

Could you post the full text of "long comment" ?

¥

5 Nov 12, 2006 17:22

kddailey wrote:

I found the FAQ that mentioned that FTP and eidting programs could cause problems - but the three links to forum threads all return empty. Can anyone direct me to those old threads so I can continue troubleshooting?

The threads are probably lost. Can you post the FAQ entry, so we can correct it?

The error message clearly says that output starts at
/hsphere/local/home/medical0/floridastatewideproperties.com/blog/skins/custom/_main.php, line 1.

So I guess, there's a newline there before the "<?php" tag.

If not so, it may be caused by some UTF8 BOM(?) header. Save the file with latin1/iso-8859-1 encoding then.

6 Nov 13, 2006 22:34

Saving it in another txt format worked - I was using Notepad and the UFT-8 must have been adding characters. Thanks for the help!

Here's the FAQ with the broken links (the last FAQ in the forum just for FAQS.)
_____________________________________________________

Many people find that they get an error similar to the one below. In this case, it was because either spaces or blank lines were left after the closing ?> tag in conf/_locales.php, but this error occurs when you leave spaces or lines (known as 'whitespace') after any of the files in the conf directory.

Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/unkemptw/public_html/b2soft/conf/_locales.php:147) in /home/unkemptw/public_html/b2soft/b2evocore/_functions_users.php on line 202

Warning: Cannot modify header information - headers already sent by (output started at /home/unkemptw/public_html/b2soft/conf/_locales.php:147) in /home/unkemptw/public_html/b2soft/htsrv/login.php on line 28

This can be caused by any number of things, but most commonly it's the software you're using to edit the files, or your ftp software.

This problem is referenced in the manual at http://b2evolution.net/man/2004/06/16/tricky_stuff

Here's a list of threads that have people with this problem, and some of the methods to correct it:

http://forums.b2evolution.net/viewtopic.php?t=202 (note that the filenames in this thread refer to an old version, and have now been replaced with _config.php and _advanced.php)

http://forums.b2evolution.net/viewtopic.php?t=1023

http://forums.b2evolution.net/viewtopic.php?t=298
_____________________________________________

7 Nov 13, 2006 23:09

Thanks. I've edited the FAQ post.


Form is loading...