' .'Alternatively, you can use Securimage 2.0, but it is not advised.'; exit; } $GLOBALS['session_start_error'] = null; $level = error_reporting(0); set_error_handler('session_error_handler', E_ALL); session_name('securimage_test'); $sessionStarted = @session_start(); restore_error_handler(); session_test(); if (isset($_GET['testimage']) && $_GET['testimage'] == '1') { $im = imagecreate(225, 225); $white = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); $red = imagecolorallocate($im, 255, 0, 0); $green = imagecolorallocate($im, 0, 255, 0); $blue = imagecolorallocate($im, 0, 0, 255); // draw the head imagearc($im, 100, 120, 200, 200, 0, 360, $black); // mouth imagearc($im, 100, 120, 150, 150, 25, 155, $red); // left and then the right eye imagearc($im, 60, 95, 50, 50, 0, 360, $green); imagearc($im, 140, 95, 50, 50, 0, 360, $blue); imagestring($im, 5, 15, 1, 'Securimage Will Work!!', $blue); imagestring($im, 2, 5, 20, ':) :) :)', $black); imagestring($im, 2, 5, 30, ':) :)', $black); imagestring($im, 2, 5, 40, ':)', $black); imagestring($im, 2, 150, 20, '(: (: (:', $black); imagestring($im, 2, 168, 30, '(: (:', $black); imagestring($im, 2, 186, 40, '(:', $black); header('Content-type: image/png'); imagepng($im, null, 3); exit; } function session_test() { if (!isset($_GET['testimage'])) { if (isset($_GET['tested'])) { if (!isset($_SESSION['securimage_test_value'])) { $GLOBALS['session_start_error'] = "The session started successfully, but the test value " ."was not found.
Click " ."here to try the test again.
Make sure cookies are enabled in your browser.
"; } } else { if ($GLOBALS['session_start_error'] != null) { echo 'Failed to start the PHP session.

' .'The session' .' did not start properly. This could indicate a problem ' .'the PHP configuration on this server.

' .'The following error occurred when attempting to call session_start():
' .'
' . htmlspecialchars($GLOBALS['session_start_error']) . '
' .'In order for Securimage to work, you ' .'must resolve the error.

' .'If after searching Google ' .'and StackOverflow ' .'for causes to the problem and you still cannot resolve the error, contact ' .'the developers ' .'of Securimage for assistance.
Provide as much information about the problem ' .' and error as possible, and we can help resolve the issue.'; exit; } $_SESSION['securimage_test_value'] = 'test'; header('Location: ' . $_SERVER['PHP_SELF'] . '?tested=1'); exit; } } } function print_status($supported) { if ($supported) { echo "Yes!"; } else { echo "No"; } } function session_error_handler($errno, $errstr, $errfile, $errline) { $GLOBALS['session_start_error'] = $errstr; return true; } ?> Securimage Test Script

Securimage Test Script

This script will test your PHP installation to see if Securimage will run on your server.

There is a warning, but otherwise you meet the requirements for using Securimage. Your server meets the requirements for using Securimage!

Test Image Based on the requirements, you do not have what it takes to run Securimage :(