Join us at IRC!
Ideas are far more powerful than guns.
Friday, May 25, 2012
Navigation
Members Online
Total Online: 26
Web Spiders: 13
Guests Online: 23
Members Online: 3

Registered Members: 70208
Newest Member: andresuran
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

PHP Sessions

x_5631
Member

Posts: 156
Location: Uk
Joined: 22.06.07
Rank:
Mad User
Posted on 24-03-08 23:50
When using a PHP session I'm getting the warning:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/www/*****/profile.php:18) in /home/www/*****/profile.php on line 25

and When I'm setting the session I'm using:

session_start();
$_SESSION["name"] = $_POST["uname"];
$_SESSION["user_id"] = $res["id"];
$_SESSION["active"] = 1;


Anyone know what I need to change/add?


Author

RE: PHP Sessions

spyware
Member



Posts: 4190
Location: The Netherlands
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 24-03-08 23:54
You need to add these:

-a search on PHP.net
-a search on Google




"The chowner of property." - Zeph
“Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.”
- Carl Sagan
“Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?” - Ebert
http://bitsofspy.net
Author

RE: PHP Sessions

Dark coder
Member

Posts: 12
Location: Topeka, KS
Joined: 13.02.08
Rank:
Moderate
Posted on 25-03-08 00:26
i like the google idea
http://rvb.roosterteeth.com/members/profile.php?uid=660353
Author

RE: PHP Sessions

sacman
Member

Posts: 120
Location: Germany
Joined: 19.03.08
Rank:
Hacker Level 1
Posted on 25-03-08 01:14
i believe u have to start the session in the first line


Semper fidelis



Author

RE: PHP Sessions

only_samurai
[IRC Rockstar]

Posts: 984
Location: idling in some random irc channel
Joined: 18.08.06
Rank:
.|unranked|.
Posted on 25-03-08 04:18
i bet the session_start() isnt the first line of php code you have. put it there and your problems are solved.


The problem with a fool-proof system, is eliminating the fool.

"His name is Cereal Killer...Like Fruitloops."
If you cut me, I bleed binary.

http://blog.psych0tik.net/
http://blog.psych0tik.net
Author

RE: PHP Sessions

Feralas
Member



Posts: 301
Location: 127.0.0.1
Joined: 25.02.08
Rank:
HBH Guru
Posted on 25-03-08 06:23
Put the session php code before you're html.
<?php
session blah blah
?>
<html>
<head>
...




/-- Ipsa Scientia Potestas Est --\



\-- Knowledge itself is power. --/


To fear death is to limit life.
google.com
Author

RE: PHP Sessions

x_5631
Member

Posts: 156
Location: Uk
Joined: 22.06.07
Rank:
Mad User
Posted on 25-03-08 11:12
Thanks alot guys. I knew it would be something simple like that. :D

Works lovely now :)


Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.