Thanks for your tips Mike! One nasty thing to debug is that the error only shows up from time to time. So now everything seems OK.
What do i have now? I start my code with session_start Then include some files. The last one is get_cartID.php (remember?) Then i use several functions to have cart functionallity. In show_cart i include my page heading and then output further body and footer content. When I put the get_cartID include file AFTER include "heading.php" into my show cart function, the other functions start complaining they can't access the function get_cartID. Lots of text, sorry for that. But I still don't have the clue. Maybe you like to see my code? Any help welcome! Fred -----Original Message----- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: dinsdag 15 juli 2003 11:36 To: 'frederik feys'; [EMAIL PROTECTED] Subject: RE: [PHP] headers already sent and cookie problem > -----Original Message----- > From: frederik feys [mailto:[EMAIL PROTECTED] > Sent: 15 July 2003 09:45 > > This is what i get: > "Warning: Cannot add header information - headers already > sent by (output started at /home/u/r/html/store/cart.php:188) > in /home/u/r/html/store/includes/functions/get_cartID.php on line 14" This says that on line 188 of store/cart.php you started outputting your HTML page, but you can't do that before the attempt to send headers on line 14 of store/includes/functions/get_cartID.php. Take a good look at line 188 of store/cart.php to see what you can do so that it is not starting HTML output, or move the header calls above the point where it is included/required. > I know that the problem is the reading of the cookie and then > after some sripting outputting page HTML. No, other way around. > I started my code > ob_start() > and do an ob_flush() within a function(show_cart) (?might > that be a problem?) Actually, that should be a preventer for the problem, so long as the ob_start() is executed before output is started -- perhaps your ob_start() should occur earlier in your script? Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php