-
- 1,198 Posts
After ugrade to TP3.2 i got this error:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/manager/includes/document.parser.class.inc.php:442) in /var/www/html/manager/includes/document.parser.class.inc.php on line 405
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: Cannot modify header information - headers already sent by (output started at /var/www/html/manager/includes/document.parser.class.inc.php:442)
Error type/ Nr.: Warning - 2
File: /var/www/html/manager/includes/document.parser.class.inc.php
Line: 405
Line 405 source: header($header);
I would suspect a snippet or something in the old installation. Perhaps a snippet is trying to redirect somewhere using the "header" function and is getting tangled up with the newer version of the parser?
-
- 1,198 Posts
Thanks Susan
The only snipped used are Newslisting and Flexsearchform...
-
- 1,198 Posts
Also might want to check your template and any chunks, make sure there’s no stray <?=blah blah ?> in it. All php code has to be in snippets or TVs.
And...are you extra sure that you replaced the index.php file? I’ve forgotten that a few times, both in the root folder and the manager folder, and it can really result in some wierd errors!
Looks like PHP itself is trying to spit out an error, and MODx is getting its panties in a bunch because of the PHP error message trying to echo to the screen before MODx. Check the page source in your browser; sometimes error messages will be there but not rendered by the browser.
-
- 1,198 Posts
Replaced all files (included index.php) - this is the template code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//IT"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it">
<head>
<title>[(site_name)] » [*pagetitle*]</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
@import url('style.css');
</style>
</head>
<body>
<table width="658" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="9" background="img/ombraleft.jpg"> </td>
<td height="127" colspan="2" background="img/bg_header.jpg"><table width="640" height="127" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="409" height="95"> </td>
<td width="231"><div align="center">[[FlexSearchForm?FSF_showResults=0]]</div></td>
</tr>
<tr align="center">
<td align="left"> <div align="center"> {{NavServizi}}
</div></td>
<td align="right">{{NavAzienda}} </td>
</tr>
</table></
td>
<td width="9" background="img/ombrargt.jpg"> </td>
</tr>
<tr>
<td width="9" background="img/ombraleft.jpg"> </td>
<td width="408" height="224" valign="top" bgcolor="#FFFFFF">[*mainfoto*]<br /> <table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td><h1>[*longtitle*]</h1>
<p>[*content*]</p></td>
</tr>
</table> </td>
<td width="232" rowspan="2" valign="top" bgcolor="#cbea76"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><p>[*rightcontent*]</p>
</td>
</tr>
</table></td>
<td width="9" background="img/ombrargt.jpg"> </td>
</tr>
<tr>
<td width="9" background="img/ombraleft.jpg"> </td>
<td width="408" height="85" background="img/bg_header.gif" bgcolor="#CCCCCC"><img src="img/alpha.gif" width="1" height="85" />{{Footertext}}</td>
<td width="9" background="img/ombrargt.jpg"> </td>
</tr>
</table>
</body>
</html>
-
- 1,198 Posts
and this is error in firefox source:
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /var/www/html/manager/includes/document.parser.class.inc.php:442) in <b>/var/www/html/manager/includes/document.parser.class.inc.php</b> on line <b>405</b><br />
<html><head><title>MODx Content Manager » </title>
<style>TD, BODY { font-size: 11px; font-family:verdana; }</style>
<script type='text/javascript'>
function copyToClip()
{
holdtext.innerText = sqlHolder.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand('Copy');
}
</script>
</head><body>
<h3 style='color:red'>« MODx Parse Error »</h3>
<table border='0' cellpadding='1' cellspacing='0'>
<tr><td colspan='3'>MODx encountered the following error while attempting to parse the requested resource:</td></tr>
<tr><td colspan='3'><b style='color:red;'>« PHP Parse Error »</b></td></tr><tr><td> </td></tr><tr><td colspan='3'><b>PHP error debug</b></td></tr><tr><td valign='top'> Error: </td><td colspan='2'>Cannot modify header information - headers already sent by (output started at /var/www/html/manager/includes/document.parser.class.inc.php:442)</td><td> </td></tr><tr><td valign='top'> Error type/ Nr.: </td><td colspan='2'>Warning - 2</b></td><td> </td></tr><tr><td> File: </td><td colspan='2'>/var/www/html/manager/includes/document.parser.class.inc.php</td><td> </td></tr><tr><td> Line: </td><td colspan='2'>405</td><td> </td></tr><tr><td valign='top'> Line 405 source: </td><td colspan='2'> header($header);
</td><td> </td></tr><tr><td> </td></tr><tr><td colspan='3'><b>Parser timing</b></td></tr><tr><td> MySQL: </td><td><i>0.0001 s s</i></td><td>(<i>1 Requests</i>)</td></tr><tr><td> PHP: </td><td><i>0.0359 s s</i></td><td> </td></tr><tr><td> Total: </td><td><i>0.0360 s s</i></td><td> </td></tr></table></body></html>
Well, maybe someone else will see this thread who has had a similar experience; my inclination would be to drag you through every one of your snippets, chunks, TVs and any plugins you may be using, and that could get tedious.