php session name

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jorj
Forum Newbie
Posts: 7
Joined: Tue Jul 14, 2009 8:54 pm

php session name

Post by jorj »

hey guyz! I need some help!!!

I have been using firecookies to keep track of the cookies on my browser


I had this code

Code: Select all

<?php
ini_set(session.use_cookies, 1);
ini_set(session.name, 'uid');
session_start();
?>
Its file name is session.php and it is included in all my php files

what I want is to change the session cookies' name but when I load the page,
firecookies would report the name PHPSESSID which I expect as uid

what seems to be the problem guyz...
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php session name

Post by requinix »

What seems to be the problem is that you don't have a grasp of even the most basic principles of PHP.

For example: strings.
jorj
Forum Newbie
Posts: 7
Joined: Tue Jul 14, 2009 8:54 pm

Re: php session name

Post by jorj »

yeah... now i get it

that should be ini_set('session.name', 'uid');

sorry.. it is just my first week of coding using PHP

but why PHP doesn't report any error???
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php session name

Post by requinix »

It does.

Code: Select all

ini_set("display_errors", true);
 
ini_set(session.use_cookies, 1);
ini_set(session.name, 'uid');
display_errors can be found in your php.ini file. For a development server I strongly suggest you turn it on by default.
Post Reply