Sessions cause php to crash!

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
Data
Forum Newbie
Posts: 15
Joined: Tue Jun 25, 2002 4:14 am
Location: Aberdeen, Scotland

Sessions cause php to crash!

Post by Data »

Whenever I try to use sessions in my scripts php crashes:

php.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

I tried a test script which contains only this:

Code: Select all

<?php
session_start();
?>

<html>
<body>
A test.
</body>
</html>
but it still crashes.

Anybody have any idea why this is?
conthox
Forum Commoner
Posts: 39
Joined: Tue Jun 25, 2002 1:44 pm
Location: Sweden

did u reinstall php

Post by conthox »

Did you try to install the latest version of PHP ?

What webserver are you running ?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

is session.save_path in your php.ini valid an accessable with php's uid?
(only a guess - I don't know if this can cause such an error)
Data
Forum Newbie
Posts: 15
Joined: Tue Jun 25, 2002 4:14 am
Location: Aberdeen, Scotland

Post by Data »

At the moment it is set to /tmp.

It says that windows users should change this - where should I change it to?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

to any valid directory you want to.
I -for example- have
e:\
..-webserver
....-htdocs
....-upload.tmp
....-session.data
....-ftp
....- and so on

-> session.save_path = E:/webserver/sessions
Data
Forum Newbie
Posts: 15
Joined: Tue Jun 25, 2002 4:14 am
Location: Aberdeen, Scotland

Post by Data »

Thanks for the help.

I ended up installing the newest version of PHP, and it seems to be working. Now I'll have to start using the $_GET[] etc and changing all my previous code!

Also, why is $PHP_SELF coming up as an undefined variable?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

it also 'went' into an array
$_SERVER['PHP_SELF']

but you still have the possibility to set register_globals to On.
Data
Forum Newbie
Posts: 15
Joined: Tue Jun 25, 2002 4:14 am
Location: Aberdeen, Scotland

Post by Data »

Ah, thanks!
Post Reply