Jump to content

Cannot modify header information - zenphoto include


n9ne

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!
Link to comment
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]
Link to comment
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)
Link to comment
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]
Link to comment
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]
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.