Re: Sessions not working. Used to work fine.



On 28 Feb, 04:57, "Nik Coughlin" <nrkn....@xxxxxxxxx> wrote:
Hendri Kurniawan wrote:
Nik Coughlin wrote:
Steve wrote:
"Nik Coughlin" <nrkn....@xxxxxxxxx> wrote in message
news:es2o3p$550$1@xxxxxxxxxxx
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 '<a href="sessionTest1.php">Test Page 1</a>';

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.

.



Relevant Pages

  • Re: sessions being destroyed prematurely
    ... The target PHP files carry session information themselves and return ... The PHP session id is typically stored in a cookie. ... Your java applet will need to pass this information back to the PHP page. ... You can get the cookie in your applet and pass it on in the header, or you can pass it as a hidden field as a post value or in the url as a get value. ...
    (comp.lang.php)
  • Re: Sessions not working. Used to work fine.
    ... PHP Version 4.4.1 running under IIS. ... and the same code works on other machines. ... directory (the directory that PHP store session information) exists. ... I can specify to PHP to send error message to Apache's ...
    (alt.php)
  • Re: Sessions not working. Used to work fine.
    ... PHP Version 4.4.1 running under IIS. ... directory (the directory that PHP store session information) exists. ... 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. ...
    (alt.php)