Sessions in PHP

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
User avatar
farid
Forum Commoner
Posts: 54
Joined: Thu Nov 11, 2004 4:20 pm
Location: Mexico

Sessions in PHP

Post 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:
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

post some code?

You have the same version of php?
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Post 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. :)
User avatar
farid
Forum Commoner
Posts: 54
Joined: Thu Nov 11, 2004 4:20 pm
Location: Mexico

Post 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?
User avatar
farid
Forum Commoner
Posts: 54
Joined: Thu Nov 11, 2004 4:20 pm
Location: Mexico

Post 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:
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post 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.
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Post 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
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

session.cookie_lifetime = 0
??
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Post by php_wiz_kid »

Lifetime in seconds of cookie or, if 0, until browser is restarted.
User avatar
farid
Forum Commoner
Posts: 54
Joined: Thu Nov 11, 2004 4:20 pm
Location: Mexico

Post by farid »

thanks y'all I´ll check it right away!! :lol:
Post Reply