https://www.icyphoenix.com/viewtopic.php?f=35&t=6001
-----------------------------------
vgvgf
Sun 21 Jun, 2009 03:02

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 [url=http://everempire.net/]http://everempire.net/), and I am receiving messages like this in my web all the time since installing it:
[spoiler]Warning: include_once() [function.include-once]: Unable to access ./includes/mods_settings/mod_icy_phoenix.php in /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php on line 666
Warning: include_once(./includes/mods_settings/mod_icy_phoenix.php) [function.include-once]: failed to open stream: Permission denied in /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php on line 666
Warning: include_once() [function.include]: Failed opening './includes/mods_settings/mod_icy_phoenix.php' for inclusion (include_path='.:/usr/share/php5/') in /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php on line 666
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php:666) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1403
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php:666) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1405
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php:666) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1406[/spoiler]
[spoiler]Warning: include(./common.php) [function.include]: failed to open stream: Permission denied in /home125a/sub006/sc69573-TMYE/everempire/viewforum.php on line 26
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/viewforum.php:26) in /home125a/sub006/sc69573-TMYE/everempire/includes/sessions.php on line 473
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/viewforum.php:26) in /home125a/sub006/sc69573-TMYE/everempire/includes/sessions.php on line 474
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/viewforum.php:26) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1406
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/viewforum.php:26) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1408
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/viewforum.php:26) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1409[/spoiler]
[spoiler]Warning: include_once(./../includes/functions_groups.php) [function.include-once]: failed to open stream: Permission denied in /home125a/sub006/sc69573-TMYE/everempire/adm/index.php on line 31
Warning: include_once() [function.include]: Failed opening './../includes/functions_groups.php' for inclusion (include_path='.:/usr/share/php5/') in /home125a/sub006/sc69573-TMYE/everempire/adm/index.php on line 31
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/adm/index.php:31) in /home125a/sub006/sc69573-TMYE/everempire/adm/index.php on line 852
Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/adm/index.php:31) in /home125a/sub006/sc69573-TMYE/everempire/adm/index.php on line 853[/spoiler]
[spoiler]Warning: fopen(./../cache/sql_auth_e1d0c7941bd30b966742ab639b7f0a83.php) [function.fopen]: failed to open stream: Permission denied in /home125a/sub006/sc69573-TMYE/everempire/includes/db/mysql4.php on line 704

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/db/mysql4.php:704) in /home125a/sub006/sc69573-TMYE/everempire/adm/page_header_admin.php on line 224

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/db/mysql4.php:704) in /home125a/sub006/sc69573-TMYE/everempire/adm/page_header_admin.php on line 226

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/db/mysql4.php:704) in /home125a/sub006/sc69573-
[/spoiler]

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 linenumbers=false]{
	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');
}[/code]

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

Thanks in advance


-----------------------------------
Danielc
Sun 21 Jun, 2009 03:34

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

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

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

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 

[quote user="New Player" post="34708"]this disable the cache..let me know if this work

open includes/constants.php

find
[code linenumbers=false]// 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[/code]

replace with

[code linenumbers=false]// 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[/code][/quote]


That worked for me


-----------------------------------
vgvgf
Sun 21 Jun, 2009 17:08

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

The warnings are still appearing.

Here is another of those messages:
[spoiler]Warning: include_once(./language/lang_spanish/lang_main_attach.php) [function.include-once]: failed to open stream: Permission denied in /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php on line 756

Warning: include_once() [function.include]: Failed opening './language/lang_spanish/lang_main_attach.php' for inclusion (include_path='.:/usr/share/php5/') in /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php on line 756

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php:756) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1403

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php:756) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1405

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/includes/functions.php:756) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1406[/spoiler]

Edit: and another one:
[spoiler]Warning: include(./includes/attach_mod/attachment_mod.php) [function.include]: failed to open stream: Permission denied in /home125a/sub006/sc69573-TMYE/everempire/common.php on line 263

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/common.php:263) in /home125a/sub006/sc69573-TMYE/everempire/includes/sessions.php on line 473

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/common.php:263) in /home125a/sub006/sc69573-TMYE/everempire/includes/sessions.php on line 474

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/common.php:263) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1403

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/common.php:263) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1405

Warning: Cannot modify header information - headers already sent by (output started at /home125a/sub006/sc69573-TMYE/everempire/common.php:263) in /home125a/sub006/sc69573-TMYE/everempire/includes/page_header.php on line 1406[/spoiler]



[b]Another Edit:[/b] 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?


