Icy Phoenix


Old Support Topics - PHP Warnings "Cannot Modify Header Information - Headers Already Sent By"



vgvgf [ Sun 21 Jun, 2009 03:02 ]
Post subject: PHP Warnings "Cannot Modify Header Information - Headers Already Sent By"
Hi,
I am using Icy 1.2.0.27c version from a new installation(My web is http://everempire.net/), and I am receiving messages like this in my web all the time since installing it:
Spoiler: [ Show ]

Spoiler: [ Show ]

Spoiler: [ Show ]

Spoiler: [ Show ]


The warnings seems to appear randomly, they can appear sometimes and other not. Also, they seem to appear in all pages of my web(Inluding admin panel), but the messages seems to vary in the files named there.
It seems to be a problem with "include_once()", but I don't know much about php errors.

In page_header.php the warnings seem to come from:
if (!defined('AJAX_HEADERS'))
Code: [Hide] [Select]
{
if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');
}


What can it be? Is there any way to deactivate those warnings in php?

Thanks in advance


Danielc [ Sun 21 Jun, 2009 03:34 ]
Post subject: Re: PHP Warnings "Cannot Modify Header Information - Headers Already Sent By"
Be sure that you have set the permissions correctly, and then, try clearing Cache.


vgvgf [ Sun 21 Jun, 2009 04:23 ]
Post subject: Re: PHP Warnings "Cannot Modify Header Information - Headers Already Sent By"
The files and folders permissions seems to be ok. I have also cleared the cache, but the warnings messages are still persisting.


Danielc [ Sun 21 Jun, 2009 15:03 ]
Post subject: Re: PHP Warnings "Cannot Modify Header Information - Headers Already Sent By"
If it isn't a permission problem, i don't know what could it be..


spydie [ Sun 21 Jun, 2009 16:44 ]
Post subject: Re: PHP Warnings "Cannot Modify Header Information - Headers Already Sent By"
just reload the page and the problem goes away.

I´ve the same prob with mi installation of .27c

There was a way to clear cache and the problem goes away aswell.
but i can´t remember how.
I think it was new player or the Steffen who told me how.

Edit :
Just found it

New Player wrote: [View Post]
this disable the cache..let me know if this work

open includes/constants.php

find
Code: [Hide] [Select]
// Cache SQL Queries
define('CACHE_SQL', true); // Caching SQL Queries ON
//define('CACHE_SQL', false); // Caching SQL Queries OFF

// Cache Config Tables
define('CACHE_CFG', true); // Caching Config Tables ON
//define('CACHE_CFG', false); // Caching Config Tables OFF

// Cache CH SQL
define('CACHE_CH_SQL', true); // Caching CH SQL ON
//define('CACHE_CH_SQL', false); // Caching CH SQL OFF


replace with

Code: [Hide] [Select]
// Cache SQL Queries
//define('CACHE_SQL', true); // Caching SQL Queries ON
define('CACHE_SQL', false); // Caching SQL Queries OFF

// Cache Config Tables
//define('CACHE_CFG', true); // Caching Config Tables ON
define('CACHE_CFG', false); // Caching Config Tables OFF

// Cache CH SQL
//define('CACHE_CH_SQL', true); // Caching CH SQL ON
define('CACHE_CH_SQL', false); // Caching CH SQL OFF



That worked for me


vgvgf [ Sun 21 Jun, 2009 17:08 ]
Post subject: Re: PHP Warnings "Cannot Modify Header Information - Headers Already Sent By"
Yes, reloading the page makes those warnings to disappear, but they are really annoying.

I will try disabling the cache, thanks.

Edit: Not working

The warnings are still appearing.

Here is another of those messages:
Spoiler: [ Show ]


Edit: and another one:
Spoiler: [ Show ]




Another Edit: Well, it seems resolved now. It wasn't a problem of icyphoenix after all, it was a server problem, I asked for asistance, and it is fixed now. Thanks Danielc and spydie!

Also, should I undo the changes in constants.php? Or is it better with those modifications?




Powered by Icy Phoenix