The takeaway from that is to make sure that the file is actually being executed as PHP. As long as you're including it it and/or executing it as a PHP file, everything should work out fine. However, if you do want to test and make sure this isn't the issue, here's another case you can run:
index.php
detect.txtPHP Code:<?php
session_start();
if( isset( $_GET[ 'session-set' ] ))
{
include( 'detect.txt' );
session_unset();
exit;
}
$_SESSION[ 'foo' ] = true;
header( 'Location: index.php?session-set' );
If this returns session failed, the text file is not necessarily the issue and we'd have to do further debugging to verify.PHP Code:<?php
echo isset( $_SESSION[ 'foo' ] ) ? "Session worked." : "Session failed.";
Sorry, make sure that the PHP file is called "redirect.php", otherwise the script redirects to another page. (Or just modify the script, whatever you feel is easier).

