Page 1 of 1

[SOLVED] session cookies

Posted: Sun Mar 06, 2005 7:10 am
by patch2112
Hello all, pulling out my hair and I don't have much left. I'm trying to keep php from appending the SID to the URL and require that the session cookie was set.

I've tried everything I can find...

1. Set session.use_only_cookies=1 in php.ini, but the setting wasn't there. I added it manually and it still didn't work.

2. Set session.use_coolies = 1 in php.ini

3. Set session.use_trans_sid = 0 in php.ini

I even tried adding
ini_set('session.use_only_cookies',1); prior to any session_starts and that didn't work either, I still am getting the damn url appended.

Here is the php.ini boiled down to session stuff

Code: Select all

variable in order to use PHP's session functions.
session.save_path = /tmp; 

Whether to use cookies.
session.use_cookies = 1; 

My entry.
session.use_only_cookies = 1;

Name of the session (used as cookie name).
session.name = PHPSESSID; 

Initialize session on request startup.
session.auto_start = 0; 

Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0; 

The path for which the cookie is valid.
session.cookie_path = /; 

The domain for which the cookie is valid.
session.cookie_domain =; 

use transient sid support if enabled by compiling with --enable-trans-sid.
session.use_trans_sid = 0;

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
їMSSQL] ;
Any thoughts?

Thanks, Philip

Posted: Sun Mar 06, 2005 7:16 am
by JAM
Do you use some 3rd part scripts? Asking because some CMS's/boards enable the SID even though you do not want to. Or at least simulate it.

Dumb question, but did you restart the httpd daemon? :roll:

I have the same settnigs as you on a couple of computers, and I have no issues with this...

Thanks

Posted: Sun Mar 06, 2005 7:23 am
by patch2112
There aren't any dumb questions, only dumb people.

I'm still very new and self teaching, so I'll forgive myself this time.

Thanks for the help,
Philip

Posted: Sun Mar 06, 2005 7:48 am
by JAM
Meaning... what?
You did forget to restart the httpd?

Just making sure so that other readers might get a hint on what the need to do if they have the same issues.

Answer

Posted: Sun Mar 06, 2005 7:49 am
by patch2112
I was hoping to save a little dignity, but just so all the world can see...

I'm an idiot and didn't restart apache.

Posted: Sun Mar 06, 2005 8:00 am
by JAM
Sorry for making you crawl in the dirt... :lol:
I can assure you, that we've all more likely done this more than once ourselves.

Glad it works!

thanks

Posted: Sun Mar 06, 2005 8:01 am
by patch2112
lol,

Glad it works too, thanks again for your help!

Washing and recovering,
Philip