Source for file test.php
Documentation is available at test.php
/* Register a session. */
ini_set('register_long_arrays','1');
/* Initialize the phpUserTrack_Test:: class. */
if (!include_once './lib/libTest.php') {
/* Try and provide enough information to debug the missing file. */
echo '<br /><span class="notsupported">Unable to find phpUserTrack/lib/libTest.php. ' .
'Your phpUserTrack installation may be missing critical files, or PHP may not ' .
'have sufficient permissions to include files. There may be error messages printed ' .
'above this message that will help you in debugging the problem.</span>';
/* If we've gotten this far, we should have found enough of phpUserTrack to run
* tests. Create the testing object. */
/* phpUserTrack definitions. */
$module = 'phpUserTrack';
require_once './include/version.php';
/* PHP module capabilities. */
'descrip' => 'MySQLi Support',
'error' => 'phpUserTrack cannot run without MySQLi support in PHP'
'descrip' => _('GD Graphics Library'),
'error' => 'Provides dynamic graph images'
'descrip' => 'HTML Tidy Support',
'error' => 'Provides HTML cleanup'
'path' => 'Net/GeoIP.php',
'error' => 'You do not have the GeoIP package installed on your system. ' .
'Lots of cool functionality comes from installing it, so you should :P',
'error' => 'Database abstraction layer.',
'MDB2 MySQL Driver' => array(
'path' => 'MDB2/Driver/mysql.php',
'error' => 'MySQL Database abstraction layer.',
'MDB2 MySQLi Driver' => array(
'path' => 'MDB2/Driver/mysqli.php',
'error' => 'MySQLi Database abstraction layer.',
'Structures Graph' => array(
'path' => 'Structures/Graph.php',
'error' => 'Directed Graph Package',
'path' => 'Cache/Lite.php',
'error' => 'Caching framework. Speeds up page display.',
/* Required configuration files. */
$module_output = $phpUserTrack_test->phpModuleCheck($module_list);
$config_output = $phpUserTrack_test->requiredFileCheck($file_list);
$pear_output = $phpUserTrack_test->PEARModuleCheck($pear_list);
<title>phpUserTrack System Capabilities Test</title>
<link href="style.css" rel="stylesheet" type="text/css" />
/* Display PHP Version information. */
$php_info = $phpUserTrack_test->getPhpVersionInformation();
<li>PHP Version: <?php echo $php_info->version ?></li>
<li>PHP Major Version: <?php echo $php_info->major ?></li>
<?php if (isset ($php_info->minor)): ?>
<li>PHP Minor Version: <?php echo $php_info->minor ?></li>
<?php if (isset ($php_info->subminor)): ?>
<li>PHP Subminor Version: <?php echo $php_info->subminor ?></li>
<li>PHP Version Classification: <?php echo $php_info->class ?></li>
<li style="color: <?php echo $php_info->status_color ?>"><strong> <?php echo $php_info->status ?></strong></li>
<?php if (isset ($php_info->version_check)): ?>
<li> <?php echo $php_info->version_check ?></li>
<?php if (isset ($php_info->insecure)): ?>
<li style="color:orange"><strong> <?php echo $php_info->insecure ?><strong></li>
<h2>PHP Module Capabilities</h2>
<?php echo $module_output ?>
<?php echo $pear_output ?>
<h2>Required phpUserTrack Configuration Files</h2>
<?php echo $config_output ?>
echo '<h2 class="supported">phpUserTrack Passes all tests</h2>';
echo '<h2 class="notsupported">phpUserTrack Failed tests</h2>';
echo '<a href="javascript/javatest.html">Test Javascript Submit</a>';
|