110mb.com Forum
News: Can't upload images in SiteBuilder on Box17? Solution here. | CGI/Perl/Python disabled on all servers. Updating it's security... | Ads trial to begin end of July/early Aug. More...
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 05, 2009, 08:09:34 AM


Login with username, password and session length


Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Question about PHP errors.  (Read 803 times)
kriššyafc
Super Authority member
******
Offline Offline

Posts: 1946


« on: October 07, 2007, 10:53:30 PM »

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/settings.php:2) in /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/login.php on line 14

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/settings.php:2) in /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/login.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/settings.php:2) in /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/login.php on line 16

whats dose this mean

Also you must specify a topic subject krissyafc.... ~Diemux
« Last Edit: October 08, 2007, 12:21:08 AM by Diemux » Logged

antimatter15
Loyal 110MB Member
*******
Online Online

Posts: 3398


WWW
« Reply #1 on: October 07, 2007, 10:58:35 PM »

it means you already did something like

echo "stuff";

before doing a function like:

header("stuff")
or
setcookie("stuff")
or
session_start()

i'm not sure if this would work, but maybe adding ob_start("gzhandler"); and ob_end_flush() at the beginning/ end would fix it.
Logged

Ajax Animator, a web-based, collaborative animation authoring environment with Flash, Silverlight, and GIF export.
bind
just a man
Authority Member
****
Offline Offline

Posts: 898



« Reply #2 on: October 07, 2007, 11:17:13 PM »


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/settings.php:2) in /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/login.php on line 14

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/settings.php:2) in /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/login.php on line 14

Warning: Cannot modify header information - headers already sent by (output started at /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/settings.php:2) in /www/110mb.com/h/y/b/r/i/d/t/u/hybridtube/htdocs/login.php on line 16

whats dose this mean

it means the session has been started after php has sent output to the browser.

start the session prior to the output if at all possible, because the output buffering mentioned adds considerably to the server resource usage.

its more efficient coding practices.

start sessions immediately in app (pre include/required or in an include/required class that always used, like a config file or security class) script is usually a good practice.

also, using an arguement in includes and requireds is a good thing just in case one is called that starts a session if the session is already started, then it wont throw up an error.

example:

Code:
<?php
#
# starts a session only is one isnt already set/started
#
if (!isset($_SESSION))
     {
          
session_start();
     }
?>


... can prevent many session already started errors when working with includes and requireds start sessions in them if they were already started previously
« Last Edit: October 07, 2007, 11:19:13 PM by bind » Logged

Learn the basics, create your code, then post source code to troublshoot if you have any problems

Here is all you need to learn the basics

HTML
Javascript
CSS
PHP
MySQL



.
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

  Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC

Theme by Dilber MC | Using SEO4SMF Mod

All content on this forum (especially posts) is copyright property of 110mb & the member
who wrote the post. So if you wish to steal anyone's post on this forum, you'll wish you
were dead because our lawyers will sue your ass!