Sessions not working. Used to work fine.

Sessions have unexpectedly stopped working on a client's webserver.

PHP Version 4.4.1 running under IIS. When moving from page to page the
session information is lost.

It used to work fine, and the same code works on other machines. AFAIK
no-one has been messing with the box, but it's possible. I've asked them to
try and find out if anyone has changed anything.

Any ideas?
Nik Coughlin [ Mi, 28 Februar 2007 03:06 ] [ ID #1643008 ]

Re: Sessions not working. Used to work fine.

"Nik Coughlin" <nrkn.com [at] gmail.com> wrote in message
news:es2o3p$550$1 [at] aioe.org...
| Sessions have unexpectedly stopped working on a client's webserver.
|
| PHP Version 4.4.1 running under IIS. When moving from page to page the
| session information is lost.
|
| It used to work fine, and the same code works on other machines. AFAIK
| no-one has been messing with the box, but it's possible. I've asked them
to
| try and find out if anyone has changed anything.
|
| Any ideas?

wow, this is a big problem as of late! i recommend that you quit using
freaking google groups to access usenet. were you to use a moderately good
news reader, you'd be able to more easily see there have been at least three
long discussions about this in as many days...each describing what to look
for.

hth
Steve [ Mi, 28 Februar 2007 04:30 ] [ ID #1643009 ]

Re: Sessions not working. Used to work fine.

Steve wrote:
> "Nik Coughlin" <nrkn.com [at] gmail.com> wrote in message
> news:es2o3p$550$1 [at] aioe.org...
>> Sessions have unexpectedly stopped working on a client's webserver.
>>
>> PHP Version 4.4.1 running under IIS. When moving from page to page
>> the session information is lost.
>>
>> It used to work fine, and the same code works on other machines.
>> AFAIK no-one has been messing with the box, but it's possible. I've
>> asked them to try and find out if anyone has changed anything.
>>
>> Any ideas?
>
> wow, this is a big problem as of late! i recommend that you quit using
> freaking google groups to access usenet.

Um, I'm not using Google Groups.

> were you to use a moderately
> good news reader, you'd be able to more easily see there have been at
> least three long discussions about this in as many days...each
> describing what to look for.

You mean, if I had been already subscribed to alt.php and had been
downloading headers? Well, I wasn't already subscribed so I only got the
latest headers. I missed the posts you're talking about.

Ironically though, given your statement about not using Google Groups to
access Usenet, I was able to find those posts by searching Google Groups.
There are two posts about sessions in this group in the last two weeks, not
3 in the last 3 days.

One of them relates to something that AOL does with sessions. Not my issue.
Not related at all. No help to me.

The second one has nothing that helps me determine the cause of my problem
either.

A minimal test case:

sessionTest1.php:
<?php
session_start();
$_SESSION[ 'test' ] = "Testing";
echo "Test = " . $_SESSION[ 'test' ] . "<br>";
echo '<a href="sessionTest2.php?' . htmlspecialchars(SID) . '">Test Page
2</a>';
?>

sessionTest2.php:
<?php
session_start();
echo "Test = " . $_SESSION[ 'test' ] . "<br>";
echo 'Test Page 1';
?>

You can see what happens here:

http://www.masterpiece.co.nz/sessionTest1.php
Nik Coughlin [ Mi, 28 Februar 2007 05:37 ] [ ID #1643011 ]

Re: Sessions not working. Used to work fine.

Nik Coughlin wrote:
> Steve wrote:
>> "Nik Coughlin" <nrkn.com [at] gmail.com> wrote in message
>> news:es2o3p$550$1 [at] aioe.org...
>>> Sessions have unexpectedly stopped working on a client's webserver.
>>>
>>> PHP Version 4.4.1 running under IIS. When moving from page to page
>>> the session information is lost.
>>>
>>> It used to work fine, and the same code works on other machines.
>>> AFAIK no-one has been messing with the box, but it's possible. I've
>>> asked them to try and find out if anyone has changed anything.
>>>
> The second one has nothing that helps me determine the cause of my problem
> either.
>
> A minimal test case:
>
> sessionTest1.php:
> <?php
> session_start();
> $_SESSION[ 'test' ] = "Testing";
> echo "Test = " . $_SESSION[ 'test' ] . "<br>";
> echo '<a href="sessionTest2.php?' . htmlspecialchars(SID) . '">Test Page
> 2</a>';
> ?>
>
> sessionTest2.php:
> <?php
> session_start();
> echo "Test = " . $_SESSION[ 'test' ] . "<br>";
> echo 'Test Page 1';
> ?>
>
> You can see what happens here:
>
> http://www.masterpiece.co.nz/sessionTest1.php
>
>

Just taking a stab in the dark here: Make sure that your session
directory (the directory that PHP store session information) exists.
If you don't know where the directory is see php.ini file

Also take a look at any error log. I don't know about IIS, but when I
use apache, I can specify to PHP to send error message to Apache's error
log.

Hendri
Hendri Kurniawan [ Mi, 28 Februar 2007 05:48 ] [ ID #1643012 ]

Re: Sessions not working. Used to work fine.

Hendri Kurniawan wrote:
> Nik Coughlin wrote:
>> Steve wrote:
>>> "Nik Coughlin" <nrkn.com [at] gmail.com> wrote in message
>>> news:es2o3p$550$1 [at] aioe.org...
>>>> Sessions have unexpectedly stopped working on a client's webserver.
>>>>
>>>> PHP Version 4.4.1 running under IIS. When moving from page to page
>>>> the session information is lost.
>>>>
>>>> It used to work fine, and the same code works on other machines.
>>>> AFAIK no-one has been messing with the box, but it's possible. I've
>>>> asked them to try and find out if anyone has changed anything.
>>>>
>> The second one has nothing that helps me determine the cause of my
>> problem either.
>>
>> A minimal test case:
>>
>> sessionTest1.php:
>> <?php
>> session_start();
>> $_SESSION[ 'test' ] = "Testing";
>> echo "Test = " . $_SESSION[ 'test' ] . "<br>";
>> echo '<a href="sessionTest2.php?' . htmlspecialchars(SID) .
>> '">Test Page 2</a>';
>>>
>>
>> sessionTest2.php:
>> <?php
>> session_start();
>> echo "Test = " . $_SESSION[ 'test' ] . "<br>";
>> echo 'Test Page 1';
>>>
>>
>> You can see what happens here:
>>
>> http://www.masterpiece.co.nz/sessionTest1.php
>>
>>
>
> Just taking a stab in the dark here: Make sure that your session
> directory (the directory that PHP store session information) exists.
> If you don't know where the directory is see php.ini file

I don't have physical or VNC, or in fact any access to the machine apart
from ftp into the the site root. Looks like I might have to physically
travel to the machines location to figure out what's wrong :|

> Also take a look at any error log. I don't know about IIS, but when I
> use apache, I can specify to PHP to send error message to Apache's
> error log.

Thanks
Nik Coughlin [ Mi, 28 Februar 2007 05:57 ] [ ID #1643013 ]

Re: Sessions not working. Used to work fine.

On Wed, 28 Feb 2007 15:06:40 +1300, "Nik Coughlin"
<nrkn.com [at] gmail.com> wrote:

>Sessions have unexpectedly stopped working on a client's webserver.
>
>PHP Version 4.4.1 running under IIS. When moving from page to page the
>session information is lost.
>
>It used to work fine, and the same code works on other machines. AFAIK
>no-one has been messing with the box, but it's possible. I've asked them to
>try and find out if anyone has changed anything.

I know next to nothing about IIS, but does
<http://www.peterguy.com/php/install_iis6.html> help at all (Re.
session directory and also - further down the page - permissions)?
--
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
Great gifts: <http://www.ThisBritain.com/ASOS_popup.html>
David Quinton [ Mi, 28 Februar 2007 08:53 ] [ ID #1643014 ]

Re: Sessions not working. Used to work fine.

On 28 Feb, 04:57, "Nik Coughlin" <nrkn.... [at] gmail.com> wrote:
> Hendri Kurniawan wrote:
> > Nik Coughlin wrote:
> >> Steve wrote:
> >>> "Nik Coughlin" <nrkn.... [at] gmail.com> wrote in message
> >>>news:es2o3p$550$1 [at] aioe.org...
> >>>> Sessions have unexpectedly stopped working on a client's webserver.
>
> >>>> PHP Version 4.4.1 running under IIS. When moving from page to page
> >>>> the session information is lost.
>
> >>>> It used to work fine, and the same code works on other machines.
> >>>> AFAIK no-one has been messing with the box, but it's possible. I've
> >>>> asked them to try and find out if anyone has changed anything.
>
> >> The second one has nothing that helps me determine the cause of my
> >> problem either.
>
> >> A minimal test case:
>
> >> sessionTest1.php:
> >> <?php
> >> session_start();
> >> $_SESSION[ 'test' ] = "Testing";
> >> echo "Test = " . $_SESSION[ 'test' ] . "<br>";
> >> echo '<a href="sessionTest2.php?' . htmlspecialchars(SID) .
> >> '">Test Page 2</a>';
>
> >> sessionTest2.php:
> >> <?php
> >> session_start();
> >> echo "Test = " . $_SESSION[ 'test' ] . "<br>";
> >> echo 'Test Page 1';
>
> >> You can see what happens here:
>
> >>http://www.masterpiece.co.nz/sessionTest1.php
>
> > Just taking a stab in the dark here: Make sure that your session
> > directory (the directory that PHP store session information) exists.
> > If you don't know where the directory is see php.ini file
>
> I don't have physical or VNC, or in fact any access to the machine apart
> from ftp into the the site root. Looks like I might have to physically
> travel to the machines location to figure out what's wrong :|
>
> > Also take a look at any error log. I don't know about IIS, but when I
> > use apache, I can specify to PHP to send error message to Apache's
> > error log.
>
> Thanks

you could roll your own ultravnc single click version and ftp it to
the host, then you could ask someone to double click on it 2 times,
and hey presto you have vnc provided your router allows the incoming
request from their computer. Useful also when friends of your mum
email you for help. much less time than a long hedgin' your bets email
back.
On your machine you just need to have the viewer in listen mode
waiting for the incoming request of whatever port you set up in the
single click UltraVNC. as for IIS session issue, does it clean up
after itself, is it an automatic updates issue, shudderrrrr.
shimmyshack [ Mi, 28 Februar 2007 10:01 ] [ ID #1643017 ]

Re: Sessions not working. Used to work fine.

Message-ID: <es2o3p$550$1 [at] aioe.org> from Nik Coughlin contained the
following:

>PHP Version 4.4.1 running under IIS. When moving from page to page the
>session information is lost.

I had the same problem with a server running IIS. Unfortunately I never
resolved it and ended up passing the information another way. Let me/us
know if you find the solution.

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Geoff Berrow [ Mi, 28 Februar 2007 10:25 ] [ ID #1643018 ]
PHP » alt.php » Sessions not working. Used to work fine.

Vorheriges Thema: saving content from another site
Nächstes Thema: Passing mysql table names to php functions?