<td><span id="mainLogoText">OpenCATS</span></td> </tr> <tr> <td><span id="subLogoText">Applicant Tracking System</span></td> </tr> </table> </div> <br /> <p class="note">CATS Installation Test</p> <?php echo '<table class="test_output">'; $proceed = true; $warningsOccurred = false; $proceed = $proceed && InstallationTests::runCoreTests(); $proceed = $proceed && InstallationTests::checkMySQL(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); $proceed = $proceed && InstallationTests::checkAttachmentsDir(); $proceed = $proceed && InstallationTests::checkAntiword(); echo '</table>'; if (!$proceed) { echo '<p id="footer_fail">One ore more tests failed. Please fix the problem and refresh this page.</p>'; if ($warningsOccurred) { echo '<p id="footer_warning">One or more tests issued a warning. Once the fatal errors (red) are fixed, you may still proceed, but read the warnings carefully and address them if you can.</p>'; } } else { if ($warningsOccurred) { echo '<p id="footer_warning">One or more tests issued a warning. You may still proceed, but read the warnings carefully and address them if you can.</p>'; } echo '<p id="footer_pass">All tests passed successfully! Proceed to the next step.</p>'; } ?> </body>
public static function runInstallerTests() { global $result; if (!isset($result)) { $result = true; } if (!InstallationTests::checkPHPVersion()) { $result = false; } if (!InstallationTests::checkMagicQuotes()) { $result = false; } if (!InstallationTests::checkRegisterGlobals()) { $result = false; } if (!InstallationTests::checkMySQLExtension()) { $result = false; } if (!InstallationTests::checkSessionExtension()) { $result = false; } if (!InstallationTests::checkPCREExtension()) { $result = false; } if (!InstallationTests::checkCTypeExtension()) { $result = false; } if (!InstallationTests::checkGD2Extension()) { $result = false; } if (!InstallationTests::checkSOAPExtension()) { $result = false; } if (!InstallationTests::checkAttachmentsDir()) { $result = false; } if (!InstallationTests::checkConfigWritable()) { $result = false; } if (!InstallationTests::checkDirectoryWritable()) { $result = false; } }