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
Data
Forum Newbie
Posts: 15 Joined: Tue Jun 25, 2002 4:14 am
Location: Aberdeen, Scotland
Post
by Data » Thu Aug 22, 2002 11:55 am
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
Post
by conthox » Thu Aug 22, 2002 12:47 pm
Did you try to install the latest version of PHP ?
What webserver are you running ?
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Thu Aug 22, 2002 1:16 pm
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 » Thu Aug 22, 2002 1:26 pm
At the moment it is set to /tmp.
It says that windows users should change this - where should I change it to?
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Thu Aug 22, 2002 1:33 pm
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 » Thu Aug 22, 2002 5:16 pm
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?
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Thu Aug 22, 2002 7:18 pm
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 » Fri Aug 23, 2002 2:45 am
Ah, thanks!