Page 1 of 1

Sessions in PHP

Posted: Wed May 11, 2005 6:12 pm
by farid
Hi y'all!!

I have a site trying to make it work, it creates a session in php, where several variables are needed along the site for different purposes. I have it working in a linux system, and another one in microsoft server. This last one has a problem which I haven't been abled to solve it, 'cause the session only works for two consecutive pages in the site, and theoretically it would had to work in the entire site, so I don't know where it might be the problem.

I hope someone can find it daring enough to help me solve it.

Thanks!!! :oops:

Posted: Wed May 11, 2005 6:25 pm
by Skara
post some code?

You have the same version of php?

Posted: Wed May 11, 2005 6:27 pm
by php_wiz_kid
The code on the server in question is the exact same code you have on the other 2 serves?

Code would help too. :)

Posted: Wed May 11, 2005 6:30 pm
by farid
yeah! its exactly the same code, won't you believe it has to do something related to the configuration in the php.ini file?

Posted: Wed May 11, 2005 6:41 pm
by farid
ooh! by the way, I rather not put the code, because its awfully a lot of code, like 18 pages of php, with 300 to 400 lines in each page. :cry:

Posted: Wed May 11, 2005 6:52 pm
by Skara
yeeouch. Well, if you just posted a bit it would be nice. Just an example of where it goofs.

I suppose it could have something to do with php.ini, but I don't know what.

Posted: Wed May 11, 2005 6:53 pm
by php_wiz_kid
Yeah, take a look in the php.ini. Here's all my session stuff. This machine is WinXP Pro using PHP 5.04

session.save_handler = files

session.use_cookies = 1

session.name = PHPSESSID

session.auto_start = 0

session.cookie_lifetime = 0

session.cookie_path = /

session.cookie_domain =

session.serialize_handler = php

session.gc_probability = 1

session.gc_divisor = 100

session.gc_maxlifetime = 1440

session.bug_compat_42 = 1

session.bug_compat_warn = 1

session.referer_check =

session.entropy_length = 0

session.entropy_file =

session.cache_limiter = nocache

session.cache_expire = 180

session.use_trans_sid = 0

session.hash_function = 0

session.hash_bits_per_character = 4

Posted: Wed May 11, 2005 8:35 pm
by Skara
session.cookie_lifetime = 0
??

Posted: Wed May 11, 2005 8:42 pm
by php_wiz_kid
Lifetime in seconds of cookie or, if 0, until browser is restarted.

Posted: Thu May 12, 2005 8:51 am
by farid
thanks y'all I´ll check it right away!! :lol: