0
I’m having errors with PHP, 5.6 Standard, it used to work. now it’s showing errors.
Warning: Cannot modify header information - headers already sent by (output started at /home/maxiimpo/public_html/maxiimanager/revcal/index.php:1) in /home/maxiimpo/public_html/maxiimanager/revcal/index.php on line 2
is repeated until...
Warning: Cannot Modify header information - headers already sent by (output Started at /home/maxiimpo/public_html/maxiimanager/revcal/index.php:1) in /home/maxiimpo/public_html/maxiimanager/revcal/index.php on line 26
<?PHP
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
include ('jobs.php');
setcookie ('pg_adm_id','');
setcookie ('pg_adm_nome','');
setcookie ('pg_adm_add_pad','');
setcookie ('pg_adm_edit_pad','');
setcookie ('pg_adm_del_pad','');
setcookie ('pg_adm_add_cli','');
setcookie ('pg_adm_edit_cli','');
setcookie ('pg_adm_del_cli','');
setcookie ('pg_adm_add_cer','');
setcookie ('pg_adm_edit_cer','');
setcookie ('pg_adm_del_cer','');
setcookie ('pg_adm_ver_his','');
setcookie ('pg_adm_pod_ass','');
setcookie ('pg_adm_edi_adm','');
setcookie ('pg_login_ativo','');
setcookie ('pg_cli_id','');// cadastro do cookie em certificados
//LIMPEZA DO LOGIN INVALIDO
setcookie ('MAXI_pg_adm_user_teste','');
setcookie ('MAXI_pg_adm_senha_teste','');
?>
<head>
<meta charset='utf-8'>
<link rel='icon' type='image/png' href='images/maxiimpor-ico.png'/>
<title>MAXIIMPOR - Manager</title>
</head>
<script type='text/javascript'>// <![CDATA[
var imageCount = 0;
var currentImage = 0;
var images = new Array();
images[0] = 'images/fundo/imagens1.jpg';
images[1] = 'images/fundo/imagens2.jpg';
images[2] = 'images/fundo/imagens3.jpg';
images[3] = 'images/fundo/imagens4.jpg';
images[4] = 'images/fundo/imagens5.jpg';
images[5] = 'images/fundo/imagens6.jpg';
images[6] = 'images/fundo/imagens7.jpg';
images[7] = 'images/fundo/imagens8.jpg';
var preLoadImages = new Array();
for (var i = 0; i < images.length; i++)
{
if (images[i] == '')
break;
preLoadImages[i] = new Image();
preLoadImages[i].src = images[i];
imageCount++;
}
function startSlideShow()
{
if (document.body && imageCount > 0)
{
document.body.style.backgroundImage = 'url('+images[currentImage]+')';
document.body.style.backgroundAttachment = 'fixed';
document.body.style.backgroundRepeat = 'repeat';
document.body.style.backgroundPosition = 'left top';
currentImage = currentImage + 1;
if (currentImage > (imageCount-1))
{
currentImage = 0;
}
setTimeout('startSlideShow()', 60000);
}
}
// ]]></script>
<body>
<script>
startSlideShow();
</script>
<table width='50%' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td width='38' height='80' background='images/contorno/esquerdo-top.png'> </td>
<td align='center' valign='middle' background='images/contorno/centro-top.png'><table width='100%' border='0' align='center' cellpadding='0' cellspacing='15'>
<tr>
<td align='center'><img src='images/Logo.png' alt='' /></td>
</tr>
</table></td>
<td width='38' background='images/contorno/direito-top.png'> </td>
</tr>
<tr>
<td width='38' background='images/contorno/esquerdo-meio.png'> </td>
<td align='center' bgcolor='#FFFFFF'><form id='login adm' name='login adm' method='post' action='loginteste.php'><table width='50%' border='0' align='center'>
<tr>
<td colspan='2' align='center'><strong>Acesso ao sistema</strong></td>
</tr>
<tr>
<td width='30%' align='right'><strong>User:</strong></td>
<td width='70%' align='left'><input name='pg-adm-user' type='text' required></td>
</tr>
<tr>
<td align='right'><strong>Senha:</strong></td>
<td align='left'><input name='pg-adm-senha' type='password' required></td>
</tr>
<tr>
<td> </td>
<td><input type='submit' name='Logar' id='Logar' value='Logar' /></td>
</tr>
</table>
</form></td>
<td width='38' background='images/contorno/direito-meio.png'> </td>
</tr>
<tr>
<td width='38' height='70' background='images/contorno/esquerdo-inferior.png'> </td>
<td align='center' valign='middle' background='images/contorno/centro-inferior.png'><? echo $MAXI_VERSÃO;?></td>
<td width='38' background='images/contorno/direito-inferior.png'> </td>
</tr>
</table>
</body>
</html>
Beware that any white space,
echo
,print
, etc already starts sending the body of the HTTP response, no longer making it possible to define the headers. The four whitespaces before<?PHP
your code is an example, but the problem may also bejobs.php
.– Woss
probably the file 'Jobs.php' has already sent exit code to the browser
– user133153