Jump to content


Photo

Cannot modify header information - zenphoto include


  • Please log in to reply
8 replies to this topic

#1 n9ne

n9ne
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 01 September 2006 - 04:36 AM

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 Cannot modify header information - 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

http://www.miztreat.com/test/test2.php
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!

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 01 September 2006 - 04:39 AM

Can you post the code please.




Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 joking

joking
  • Members
  • PipPip
  • Member
  • 29 posts
  • LocationLebanon

Posted 01 September 2006 - 05:54 AM

Hi,
You should try to post some code first....
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.

Just JoKinG

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 September 2006 - 12:10 PM

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

#5 n9ne

n9ne
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 01 September 2006 - 03:17 PM

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

</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">


#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 September 2006 - 03:32 PM

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)

#7 n9ne

n9ne
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 01 September 2006 - 03:40 PM

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 :)

<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">

[attachment deleted by admin]

#8 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 01 September 2006 - 03:54 PM

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:
header ('Content-Type: text/html; charset=' . zp_conf('charset'));
Comment that out by adding // infront of it:
// header ('Content-Type: text/html; charset=' . zp_conf('charset'));


#9 n9ne

n9ne
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 01 September 2006 - 03:57 PM

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:

header ('Content-Type: text/html; charset=' . zp_conf('charset'));
Comment that out by adding // infront of it:
// header ('Content-Type: text/html; charset=' . zp_conf('charset'));


It works perfectly if i do that! THANKYOU!!!  ;D ;D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users