Page 1 of 1

php session name

Posted: Tue Jul 14, 2009 9:03 pm
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...

Re: php session name

Posted: Tue Jul 14, 2009 10:05 pm
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.

Re: php session name

Posted: Tue Jul 14, 2009 10:49 pm
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???

Re: php session name

Posted: Tue Jul 14, 2009 11:19 pm
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.