session problem

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

session problem

Post by milleusi »

i have a php code with sessions in a POST form.
main problem is when i wish to enter new values. My server makes session files in /var/lib/php/session just for the first attemp.

what to modify in php.ini??


need help....pls
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

just modify the session data????

Code: Select all

echo $_SESSION['thing'];//displays 'cool text'

$_SESSION['thing'] = 'not cool text 9000';

echo $_SESSION['thing'];//displays 'not cool text 9000'
there is no need to modify the actual session file
milleusi
Forum Commoner
Posts: 30
Joined: Mon Jun 13, 2005 3:18 am

Post by milleusi »

my code is for login. Only 1 user can login now, because i can't make more session files. Why?

I think is something in php.ini
User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Re: session problem

Post by Heavy »

milleusi wrote:i have a php code with sessions in a POST form.
That's a lot of strange things to say.
Sessions are on the server, probably kept track of through a cookie stored in the browser and passed to the server on each request.

Whether you POST or GET data shouldn't make any difference.

Did you compile PHP in any special way or just installed from package?

In php.ini there are some things to lookup:
session.save_path = /tmp
session.use_cookies = 1
session.auto_start = 0

if session.auto_start is 0, then you need to start the session manually in the script:
session_start();
...and do that before any kind of output. Otherwise the session can't be started.

Does the web server run with permissions to write in that directory /var/lib/php/session ?

I suggest you turn on display_startup_errors in php.ini if you can't see any hints. (although I have never been helped by doing that :? )

What does the web server error log say?
Post Reply