embed problem: "...Cannot modify header information...&
Posted: Thu Jan 26, 2006 8:20 pm
I've been trying to get this fixed so long, my eyes are about to go crossed, so I'm begging for someone to help me.
First, I'm not a php programmer, but I've installed countless php scripts on my website (phpbb, coppermine, etc), and researched and solved alot of problems, and I've done modifications. I have basic familiarity of php syntax. So that's my experience level.
Basically, I can't get s9y to embed properly on any html page. No matter what, I get variations of this error:
I've read the offical faq on embedding, but I've tried dozens of things. This is my "by the book" attempt:
I made a wrapper (wrapper.php) which I put in my main webpage directory(main):
Seren is my s9y directory.
I made a wrapper with a echo to demonstrate that this part works:
http://www.koopatorivm.com/main/wrapper_echo.php
The problem comes in when I try to call up this code in my main page. For testing purposes, I pair the html down to be very basic.
http://www.koopatorivm.com/main/test2.php
(edit: No works without errors, thanks guys!)
Here's the code I used:
Like I said, I read the faq. I've probably also read every post on these forums regarding the error, and on google. I get alot of people blaming this error on whitespace, but i tried that solution to death. I wish it was that simple.
Please help, I was really psyched to use this cool weblog. No matter what I try, I can't get it to work.
First, I'm not a php programmer, but I've installed countless php scripts on my website (phpbb, coppermine, etc), and researched and solved alot of problems, and I've done modifications. I have basic familiarity of php syntax. So that's my experience level.
Basically, I can't get s9y to embed properly on any html page. No matter what, I get variations of this error:
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /home/koopat2/public_html/main/test2.php:5) in /home/koopat2/public_html/seren/index.php on line 18I made a wrapper (wrapper.php) which I put in my main webpage directory(main):
Code: Select all
<?php
ob_start();
chdir("../seren");
require("index.php");
chdir("../main");
$serendipity_contents = ob_get_contents();
ob_end_clean();
?>I made a wrapper with a echo to demonstrate that this part works:
http://www.koopatorivm.com/main/wrapper_echo.php
The problem comes in when I try to call up this code in my main page. For testing purposes, I pair the html down to be very basic.
http://www.koopatorivm.com/main/test2.php
(edit: No works without errors, thanks guys!)
Here's the code I used:
Code: Select all
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
require("wrapper.php");
echo $serendipity_contents;
?>
</body>
</html>
Please help, I was really psyched to use this cool weblog. No matter what I try, I can't get it to work.