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
session problem
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
just modify the session data????
there is no need to modify the actual session file
Code: Select all
echo $_SESSION['thing'];//displays 'cool text'
$_SESSION['thing'] = 'not cool text 9000';
echo $_SESSION['thing'];//displays 'not cool text 9000'- Heavy
- Forum Contributor
- Posts: 478
- Joined: Sun Sep 22, 2002 7:36 am
- Location: Viksjöfors, Hälsingland, Sweden
- Contact:
Re: session problem
That's a lot of strange things to say.milleusi wrote:i have a php code with sessions in a POST form.
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?