Page 1 of 1

session problem

Posted: Fri Jul 01, 2005 7:00 am
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

Posted: Fri Jul 01, 2005 7:14 am
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

Posted: Fri Jul 01, 2005 7:21 am
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

Re: session problem

Posted: Sat Jul 02, 2005 4:19 pm
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?