Reply
Please help! "Session Start Cannot Modify Header Information"
Old 01-01-2009, 05:04 PM Please help! "Session Start Cannot Modify Header Information"
Average Talker

Posts: 18
Name: sassss
I had an error in which I had someone do a fix of my index.php file for my website www.alliancedirect.net and everything was solved and perfect! I always used Adobe Contribute CS4 to add the page title and header information (keywords & description) but this was the first time since this guy had helped me fix my problem in which I had modified the wrong file and when I used Contribute to edit the page title & header, my website instantly gave the following error message on the top of the flash and even my drupal (html portion) of the site:

"Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/s/h/a/shawn31/html/index.php:3) in /home/content/s/h/a/shawn31/html/includes/bootstrap.inc on line 899
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/s/h/a/shawn31/html/index.php:3) in /home/content/s/h/a/shawn31/html/includes/bootstrap.inc on line 899
Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/h/a/shawn31/html/index.php:3) in /home/content/s/h/a/shawn31/html/includes/bootstrap.inc on line 531
Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/h/a/shawn31/html/index.php:3) in /home/content/s/h/a/shawn31/html/includes/bootstrap.inc on line 532
Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/h/a/shawn31/html/index.php:3) in /home/content/s/h/a/shawn31/html/includes/bootstrap.inc on line 533
Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/h/a/shawn31/html/index.php:3) in /home/content/s/h/a/shawn31/html/includes/bootstrap.inc on line 534"

I went back to my Adobe Contribute CS4 and deleted the keywords and description I had entered and attempted to get rid of the title but it wouldn't and won't let me since I had already inputted it via Contribute. Also, I assume what it is, is that I already had the title in on my index.php.

I went to the following lines as stated in bootstap.inc and I got the following:

Line 899: "session_start();"
Lines 531-534 (I posted lines 530-535 because it showed some drupal stuff which may or may not be applicable):
530: function drupal_page_header() {
531: header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
532: header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
533: header("Cache-Control: store, no-cache, must-revalidate");
534: header("Cache-Control: post-check=0, pre-check=0", FALSE);
535: }

This is what I see at the beginning of my index.php file:

<meta name="keywords" content="">
<meta name="description" content="">
<title>Alliance Direct Financial Source offers mortgage loan modification finance refinance short sale foreclosure bailout</title><?php
// $Id: index.php,v 1.91 2006/12/12 09:32:18 unconed Exp $

I don't want to dive into this alone as I don't want to mess anything up. The pages are tied to both my flash page http://www.alliancedirect.net and any part of my non-flash page such as http://www.alliancedirect.net/calculators . Can anyone please help me with this today since today is New Years and a non-workday? Thanks again for all your help and a Happy New Years to all!
xxsassxx31 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 01-01-2009, 05:05 PM Re: Please help! "Session Start Cannot Modify Header Information"
chrishirst's Avatar
Super Moderator

Posts: 19,022
Location: Blackpool. UK
You have sent output to the useragent BEFORE setting the headers
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System | Bits & Bobs
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-01-2009, 05:16 PM Re: Please help! "Session Start Cannot Modify Header Information"
Decaf's Avatar
Ultra Talker

Posts: 490
Name: Adam
PHP Code:
<?php
session_start
();
?>
<html>
Not

PHP Code:
<html>
<?php
session_start
();
?>
__________________
Decaf is online now
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 01-01-2009, 05:48 PM Re: Please help! "Session Start Cannot Modify Header Information"
Average Talker

Posts: 18
Name: sassss
Quote:
Originally Posted by Decaf View Post
PHP Code:
<?php
session_start
();
?>
<html>
Not

PHP Code:
<html>
<?php
session_start
();
?>
I'm sorry if I sound illiterate but is this in the PHP or the Bootstrap.inc? And this will make no impact on my drupal or flash page linking together with the information, correct? Thanks so much for your diligence and quick response!
xxsassxx31 is offline
Reply With Quote
View Public Profile
 
Old 01-01-2009, 06:12 PM Re: Please help! "Session Start Cannot Modify Header Information"
Decaf's Avatar
Ultra Talker

Posts: 490
Name: Adam
the code is php code.
__________________
Decaf is online now
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 01-01-2009, 06:12 PM Re: Please help! "Session Start Cannot Modify Header Information"
Average Talker

Posts: 18
Name: sassss
I am confused....I cannot locate the area you are stating. This is the 1st half of my coding for the index.php which I think is applicable in solving this problem. Thank you once again!:

Quote:
<meta name="keywords" content="">
<meta name="description" content="">
<title>Alliance Direct Financial Source offers mortgage loan modification finance refinance short sale foreclosure bailout</title><?php
// $Id: index.php,v 1.91 2006/12/12 09:32:18 unconed Exp $

/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*/

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
xxsassxx31 is offline
Reply With Quote
View Public Profile
 
Old 01-01-2009, 06:22 PM Re: Please help! "Session Start Cannot Modify Header Information"
Decaf's Avatar
Ultra Talker

Posts: 490
Name: Adam
PHP Code:
<meta name="keywords" content="">
<
meta name="description" content="">
<
title>Alliance Direct Financial Source offers mortgage loan modification finance refinance short sale foreclosure bailout</title
Has to go after any redirects or session starts
__________________
Decaf is online now
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 01-01-2009, 07:08 PM Re: Please help! "Session Start Cannot Modify Header Information"
Average Talker

Posts: 18
Name: sassss
I tried that...still doesn't work! Here is my full html code for the index.php. Can you please tell me what I am doing wrong? Thanks again so much my friend...:

Quote:
<?php require_once './includes/bootstrap.inc'; ?><meta name="keywords" content="">
<meta name="description" content="">
<title>Alliance Direct Financial Source offers mortgage loan modification finance refinance short sale foreclosure bailout</title><?php
// $Id: index.php,v 1.91 2006/12/12 09:32:18 unconed Exp $

/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*/

drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$return = menu_execute_active_handler();

// Menu status constants are integers; page content is a string.
if (is_int($return)) {
switch ($return) {
case MENU_NOT_FOUND:
drupal_not_found();
break;
case MENU_ACCESS_DENIED:
drupal_access_denied();
break;
case MENU_SITE_OFFLINE:
drupal_site_offline();
break;
}
}
elseif (isset($return)) {
// Print any value (including an empty string) except NULL or undefined:
print theme('page', $return);

}

drupal_page_footer();
xxsassxx31 is offline
Reply With Quote
View Public Profile
 
Old 01-01-2009, 07:28 PM Re: Please help! "Session Start Cannot Modify Header Information"
Average Talker

Posts: 18
Name: sassss
Thx guys! I figured it out. thx again..
xxsassxx31 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Please help! "Session Start Cannot Modify Header Information"
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.12863 seconds with 12 queries