I'm having trouble running a standard script which has been around years, and works on other servers.
Turns out that the problem is with the variable $_SESSION['captcha_id']
The code in index.php starts:
CODE
<?php
// Make the page validate
ini_set('session.use_trans_sid', '0');
// Include the random string file
require 'rand.php';
// Begin the session
session_start();
// Set the session contents
$_SESSION['captcha_id'] = $str;
etc.
// Make the page validate
ini_set('session.use_trans_sid', '0');
// Include the random string file
require 'rand.php';
// Begin the session
session_start();
// Set the session contents
$_SESSION['captcha_id'] = $str;
etc.
and then it calls another routine which starts:
CODE
<?php
// Begin the session
session_start();
// If the session is not present, set the variable to an error message
if(!isset($_SESSION['captcha_id']))
$str = 'ERROR!';
etc.
// Begin the session
session_start();
// If the session is not present, set the variable to an error message
if(!isset($_SESSION['captcha_id']))
$str = 'ERROR!';
etc.
and I get the error message. So for some reason, the $_SESSION['captcha_id'] variable isn't crossing to the second routine (I've double checked this). Can anyone give me a hint as to why? Is there anything else I need to do or maybe there's a php setup option that I'm not aware of? I'm really lost!
The original code is at http://psyrens.com/captcha/captcha.rar if you're interested.
The second piece of code is called image.jpg.
Any help would be appreciated.
Thanks,
Paul