Author |
Message |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Tue Jun 06, 2006 12:04 pm |
|
Cannot modify header information - headers already sent by error again. I have not had it for a while now. Why would it be coming back? Thanks! |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Tue Jun 06, 2006 12:09 pm |
|
I had the same problem recently. I made some changes on my mainfile and finally resolved it. The posts I used to guide me were on this site and one other. I'll try to find the info and post it for you, but you can search here and find some answers or at least compare the beginning of your mainfile to what's posted.
One thing I do remember changing was adding a command to .htaccess. if you're a RWH client like me, you can try adding this to your .htaccess:
Quote: | PHP_FLAG output_buffering on |
|
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
blith

|
Posted:
Tue Jun 06, 2006 12:35 pm |
|
kguske wrote: | I had the same problem recently. I made some changes on my mainfile and finally resolved it. The posts I used to guide me were on this site and one other. I'll try to find the info and post it for you, but you can search here and find some answers or at least compare the beginning of your mainfile to what's posted.
One thing I do remember changing was adding a command to .htaccess. if you're a RWH client like me, you can try adding this to your .htaccess:
Quote: | PHP_FLAG output_buffering on | |
I am a RWH client. I have that line in my .htaccess but I thought recently Raven sent us emails pertaining to a change with this. I am looking abck over them but I cannot figure out what i should do. |
|
|
|
 |
kguske

|
Posted:
Tue Jun 06, 2006 12:52 pm |
|
Then you may need changes in your mainfile. Mine looks like this:
Code:$phpver = phpversion();
if ($phpver < '4.1.0') {
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
$_SERVER = $HTTP_SERVER_VARS;
}
if ($phpver >= '4.0.4pl1' && strstr($_SERVER["HTTP_USER_AGENT"],'compatible')) {
if (extension_loaded('zlib')) {
# ob_end_clean();
ob_start('ob_gzhandler');
}
} else if ($phpver > '4.0') {
if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
if (extension_loaded('zlib')) {
$do_gzip_compress = TRUE;
ob_start(array('ob_gzhandler',5));
ob_implicit_flush(0);
header('Content-Encoding: gzip');
}
}
}
$phpver = explode(".", $phpver);
$phpver = "$phpver[0]$phpver[1]";
if ($phpver >= 41) {
$PHP_SELF = $_SERVER['PHP_SELF'];
}
if (defined('FORUM_ADMIN')) {
@include_once("../../../includes/nukesentinel.php");
} elseif (defined('INSIDE_MOD')) {
@include_once("../../includes/nukesentinel.php");
} else {
@include_once("includes/nukesentinel.php");
}
if (!ini_get("register_globals")) {
import_request_variables('GPC');
}
if(isset($admin))
{
$admin = base64_decode($admin);
$admin = addslashes($admin);
$admin = base64_encode($admin);
}
if(isset($user))
{
$user = base64_decode($user);
$user = addslashes($user);
$user = base64_encode($user);
}
|
|
|
|
|
 |
blith

|
Posted:
Tue Jun 06, 2006 1:17 pm |
|
kguske wrote: | Then you may need changes in your mainfile. Mine looks like this:
Code:$phpver = phpversion();
if ($phpver < '4.1.0') {
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
$_SERVER = $HTTP_SERVER_VARS;
}
if ($phpver >= '4.0.4pl1' && strstr($_SERVER["HTTP_USER_AGENT"],'compatible')) {
if (extension_loaded('zlib')) {
# ob_end_clean();
ob_start('ob_gzhandler');
}
} else if ($phpver > '4.0') {
if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
if (extension_loaded('zlib')) {
$do_gzip_compress = TRUE;
ob_start(array('ob_gzhandler',5));
ob_implicit_flush(0);
header('Content-Encoding: gzip');
}
}
}
$phpver = explode(".", $phpver);
$phpver = "$phpver[0]$phpver[1]";
if ($phpver >= 41) {
$PHP_SELF = $_SERVER['PHP_SELF'];
}
if (defined('FORUM_ADMIN')) {
@include_once("../../../includes/nukesentinel.php");
} elseif (defined('INSIDE_MOD')) {
@include_once("../../includes/nukesentinel.php");
} else {
@include_once("includes/nukesentinel.php");
}
if (!ini_get("register_globals")) {
import_request_variables('GPC');
}
if(isset($admin))
{
$admin = base64_decode($admin);
$admin = addslashes($admin);
$admin = base64_encode($admin);
}
if(isset($user))
{
$user = base64_decode($user);
$user = addslashes($user);
$user = base64_encode($user);
}
| |
Thank you for this but what is this based on? Where did you learn of these changes. I have different things in my mainfile. I am running Sentinel 2.02 with Sentinel 2.4.2pl8 |
|
|
|
 |
CodyG
Life Cycles Becoming CPU Cycles

Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island
|
Posted:
Tue Jun 06, 2006 1:18 pm |
|
Depending on changes made ... ever heard of suexec?
I just upgraded my server and guess what... no more php as cgi. What took me years to almost get my head around, now needs learning a different way. (nuke t' you drop, I guess. <g>)
When I lost the suexec my XP users (not win2k) experienced header notices in the PM module. Sessions.php and page-header.php were not playing nice.
If your .htaccess file can give directives (non suexec) then ending that output buffering, as above in kguske post, should get rid of excess header notices.
Also have a look at the if phpversion (); in mainfile.php. Depending on your nuke version there may need to be edits.
Also, when making any changes continue to check CPanel Statistics / Error Log making sure the changes are completing cleanly. That error log is my best nuking friend.
my second best friend |
_________________ "We want to see if life is ubiquitous." D.Goldin |
|
|
 |
kguske

|
Posted:
Tue Jun 06, 2006 1:32 pm |
|
blith, that's based on the posts I found here at RavenPHPScripts and one I found elsewhere. It shouldn't matter which version of Sentinel you're using, though it might matter which patch version you're using. If I remember correctly, the .htaccess change did the trick, so I'm not sure why it isn't working for you...
CodyG, Raven switched to CGI (why would be an interesting story), which is when I suspect these issues began for blith and me. |
|
|
|
 |
blith

|
Posted:
Tue Jun 06, 2006 1:55 pm |
|
kguske wrote: | blith, that's based on the posts I found here at RavenPHPScripts and one I found elsewhere. It shouldn't matter which version of Sentinel you're using, though it might matter which patch version you're using. If I remember correctly, the .htaccess change did the trick, so I'm not sure why it isn't working for you...
CodyG, Raven switched to CGI (why would be an interesting story), which is when I suspect these issues began for blith and me. |
Thanks! I keep doing that!! I meant RavenNuke 2.02... darn it.. So would that make any difference? |
|
|
|
 |
kguske

|
Posted:
Tue Jun 06, 2006 2:01 pm |
|
It shouldn't make any difference. I test RN on another server, and I'm running a modified version of 7.5 on my RWH site. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Jun 06, 2006 10:11 pm |
|
It was my understanding that Raven turned register globals off at the PHP level, but still allowed us to override that. I do not believe he has switched over to running as CGI as he has mentioned "battling the pros and cons" for several months. There are very significant cons to doing this as well... namely, performance on heavy access sites.
NS would not work right with HTTPAuth with register globals off, so one had to switch to CGIAuth, not to be confused with running PHP as CGI rather than running within Apache.
HOwever, I was looking through the pl8 code changes and I wonder if Bob has actually made HTTPAuth work with register globals off... Would sure like to know because HTTPAuth is a bit easier to understand for folks than CGIAuth (in terms of setup) and having register globals off is a very good thing...  |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
technocrat
Life Cycles Becoming CPU Cycles

Joined: Jul 07, 2005
Posts: 511
|
Posted:
Wed Jun 07, 2006 7:48 am |
|
Many times this can be caused by a php file with space(s) or newline(s) after the ?>
Are you getting the error on a particular file, or page? Did you just edit something recently?
config.php & mainfile.php are the 2 usual suspects. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! / Only registered users can see links on this board! Get registered or login! |
|
|
 |
kguske

|
Posted:
Wed Jun 07, 2006 9:28 am |
|
It happened to several of us on the same server at the same time without changes to scripts, but there were changes to php.ini settings, we believe. |
|
|
|
 |
blith

|
Posted:
Wed Jun 07, 2006 9:50 am |
|
I switched to CGI Auth when Raven suggested it. I have globals Off in my statement in htaccess now... but I have just encountered another error in the log
Code:client denied by server configuration: /home/********/public_html/modules.php
|
What could that be? I turned on CGI auth in the Forums/admin folder... |
|
|
|
 |
kguske

|
Posted:
Wed Jun 07, 2006 9:55 am |
|
Someone tried to access your site that is blocked in your .htaccess. |
|
|
|
 |
montego

|
Posted:
Wed Jun 07, 2006 8:02 pm |
|
kguske wrote: | It happened to several of us on the same server at the same time without changes to scripts, but there were changes to php.ini settings, we believe. |
I agree, but more likely related to register globals which is the change that was made. My two sites running on the same server were not impacted by this change, however, so don't know what to tell you. |
|
|
|
 |
blith

|
Posted:
Tue Jun 13, 2006 3:07 pm |
|
A little update. In the error log I am getting a reference to line 72 in themes.php. Here is that line
Does this have anything to do with it? |
|
|
|
 |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Tue Jun 13, 2006 3:44 pm |
|
We may need a few lines either side of that to make a determination but you might want to check what value that variable has or change it from print to an echo to see if that helps. |
|
|
|
 |
montego

|
Posted:
Tue Jun 13, 2006 9:47 pm |
|
blith wrote: | I switched to CGI Auth when Raven suggested it. I have globals Off in my statement in htaccess now... but I have just encountered another error in the log
Code:client denied by server configuration: /home/********/public_html/modules.php
|
What could that be? I turned on CGI auth in the Forums/admin folder... |
blith, is your theme.php error just mentioned related at all to the quoted post above? I am confused how one would be related to the other, so need to ask. Thanks.
If not related, is there any error message along with that line reference in your error log???  |
|
|
|
 |
|