n9ne Posted September 1, 2006 Share Posted September 1, 2006 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! Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/ Share on other sites More sharing options...
redarrow Posted September 1, 2006 Share Posted September 1, 2006 Can you post the code please. Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-83816 Share on other sites More sharing options...
joking Posted September 1, 2006 Share Posted September 1, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-83845 Share on other sites More sharing options...
wildteen88 Posted September 1, 2006 Share Posted September 1, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-83977 Share on other sites More sharing options...
n9ne Posted September 1, 2006 Author Share Posted September 1, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-84070 Share on other sites More sharing options...
wildteen88 Posted September 1, 2006 Share Posted September 1, 2006 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) Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-84081 Share on other sites More sharing options...
n9ne Posted September 1, 2006 Author Share Posted September 1, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-84085 Share on other sites More sharing options...
wildteen88 Posted September 1, 2006 Share Posted September 1, 2006 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 Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-84094 Share on other sites More sharing options...
n9ne Posted September 1, 2006 Author Share Posted September 1, 2006 [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 Quote Link to comment https://forums.phpfreaks.com/topic/19316-cannot-modify-header-information-zenphoto-include/#findComment-84096 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.