Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 19th, 2006, 07:20 AM
ire ire is offline
Authorized User
 
Join Date: May 2006
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old August 21st, 2006, 07:35 AM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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


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



All times are GMT -4. The time now is 09:44 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.