Jump to content

Archived

This topic is now archived and is closed to further replies.

n9ne

Cannot modify header information - zenphoto include

Recommended Posts

Hi all, first post to this place, it looks like a really helpful forum.

I know there are loads of topics beginning with the same problem [i]Cannot modify header information [/i] - blah blah you must all be so bored of it, but im relatively new to php and i know this happens to be one of the most common errors.. anyways

[url=http://www.miztreat.com/test/test2.php]http://www.miztreat.com/test/test2.php[/url]
im trying to include zenphoto on that page, and i've got the Cannot modify header information error, i've looked on line 11 but i cant see whats causing the error, im hoping that someone could explain to me whats wrong with the php and why it wont display correctly. Hopefully i can learn something :)

thanks!

Share this post


Link to post
Share on other sites
Hi,
[b]You should try to post some code first....[/b]
are you using sessions or the function header("Location:...") in your code ?  ?
If you are... then you cant use echo or output anythg be4 them.

Share this post


Link to post
Share on other sites
It maynot  be line 11 that is the problem, but somewhere around line 11 in test2.php. Post lines 8 to 14 here from test2.php

Share this post


Link to post
Share on other sites
Hi guys, sorry i wasnt sure which part of code i should be posting, i didnt wanna post the whole page? anyways heres lines 8 to 14 of the test2.php page

[code]</head>
<body leftmargin="0" topmargin="0" link="74749e" vlink="f0fbff" alink="74749e">
<div align="center"><a name="top"></a>
<table width="750" border="0" cellpadding="0" cellspacing="0">
    <tr align="left" valign="top">
      <td width="44"><img src="Layout/header/LAYOUT5_01.gif" width="44" height="346"></td>
      <td width="706" align="center">[/code]

Share this post


Link to post
Share on other sites
Is that the output of test2.php or is that whats actually coded in test2.php? If its not, post the source code of test2.php here and not the output. As that matches the output of the code when I go to the link you posted.

I need to see more code to understand whats going on. Attach test2.php and index.php here. (Click Reply button > Additional Options... link > click Browse button, to attach files to post)

Share this post


Link to post
Share on other sites
Oh im sorry, i mis understood, heres the first 14 lines of test2.php from the actual output on the webpage.. plus i've attatched the two files, test2.php and index.php below :)

[code]<html><!-- #BeginTemplate "/Templates/miztreat.dwt" -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>Miztreat.com</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="miztreat.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" link="74749e" vlink="f0fbff" alink="74749e">
<div align="center"><a name="top"></a>
<table width="750" border="0" cellpadding="0" cellspacing="0">
    <tr align="left" valign="top">
      <td width="44"><img src="Layout/header/LAYOUT5_01.gif" width="44" height="346"></td>
      <td width="706" align="center">[/code]

[attachment deleted by admin]

Share this post


Link to post
Share on other sites
Okay, that is a little strange. How is test2.php included in the page? Is it included before line 9 in index.php? What happens if you comment out line 9 in index.php. Line 9 is this:
[code]header ('Content-Type: text/html; charset=' . zp_conf('charset'));[/code]
Comment that out by adding // infront of it:
[code]// header ('Content-Type: text/html; charset=' . zp_conf('charset'));[/code]

Share this post


Link to post
Share on other sites
[quote author=wildteen88 link=topic=106442.msg426012#msg426012 date=1157126053]
Okay, that is a little strange. How is test2.php included in the page? Is it included before line 9 in index.php? What happens if you comment out line 9 in index.php. Line 9 is this:
[code]header ('Content-Type: text/html; charset=' . zp_conf('charset'));[/code]
Comment that out by adding // infront of it:
[code]// header ('Content-Type: text/html; charset=' . zp_conf('charset'));[/code]
[/quote]

It works perfectly if i do that! [b]THANKYOU!!![/b]  ;D ;D

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.