Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2006, 07:20 AM
ire ire is offline
Authorized User
 
Join Date: May 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default fixing the 'headers already sent' warning/error

I'm sure this is a common problem and while I have found some answers to this question, I have a slightly different scenario here:
My index.php code requires my header.php file- which calls the session_start() function. The header.php comes in within the div element and simply goes:
...
<body>

      <div id="wrapper">
<?php
        require("header.php");
?>
</div>
...
with this arrangement, I get the error- "Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by..." twice in a row.
My presentation logic is a three column layout in a wrapper. Placing the above php code at the top does work, but also defeats the purpose of my box model. What please is the best way out. Thanks

 
Old August 21st, 2006, 07:35 AM
Registered User
 
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

session_start() must put before <html><head>... tags.






Similar Threads
Thread Thread Starter Forum Replies Last Post
1>Sketcher - 284 error(s), 3 warning(s) shade cat BOOK: Ivor Horton's Beginning Visual C++ 2005 1 July 21st, 2008 08:50 PM
log4j warning. and error. sureshrgsl Apache Tomcat 0 April 16th, 2007 03:08 AM
rename warning error ss2003 Beginning PHP 2 January 10th, 2007 06:23 AM
Urgent...need help fixing this error! riki_gill ASP.NET 1.x and 2.0 Application Design 0 October 27th, 2006 08:23 AM
Warning error, please help! kscritch BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 December 12th, 2005 04:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.