0

Hey guys.

Well I'm getting that irritating warning on my site when loading up a specific page.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/d6ayr7/public_html/webdevelopment.php:1) in /home/d6ayr7/public_html/masterpage.php on line 2

I've encountered and solved this problem before by moving session_start() to the top of my script before anything is outputted to the browser. I still have session_start() before anything is called, yet I still recieve the warning.

webdevelopment.php

<?php
require_once 'masterpage.php';

$page_title = 'Web Development';
echo head($page_title);
.
.

masterpage.php

<?php
session_start(); 
.
.

This occurs when I load the page webdevelopment.php, and as you can see I am still not outputting anything to the browser before session_start(), yet I still recieve the warning.

Any ideas?

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by dennishall
0

Are you sure there's no blank spaces before your opening <?php tag in either file? Even a single whitespace character (blank space, newline, tab) can throw this error.

0

I have had this type issue when I edited my PHP pages in MS WebExpression3. I viewed the file in notepad.exe and it did not display and issues, however, when I opend the page in Dreamweaver, I found garbage before the PHP opening <? tag. Once I removed the garbage, things worked fine.

Don't always trust your editor.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.