$unrtfPath = $_REQUEST['rtfExecutable']; $unrtfWithSlashes = str_replace('\\', '\\\\', $unrtfPath); CATSUtility::changeConfigSetting('UNRTF_PATH', '"' . $unrtfWithSlashes . '"'); break; case 'testResumeParsing2': echo '<script type="text/javascript">showTextBlock(\'resumeParsing\');</script>'; $result = true; echo '<br />', '<span style="font-weight: bold;">Test Results</span>', '<table class="test_output">'; $antiwordResults = !(ANTIWORD_PATH != '' && !InstallationTests::checkAntiword()); $pdftotextResults = !(PDFTOTEXT_PATH != '' && !InstallationTests::checkPdftotext()); $html2textResults = !(HTML2TEXT_PATH != '' && !InstallationTests::checkHtml2text()); if (UNRTF_PATH != '' && !$html2textResults) { echo '<tr class="fail"><td>UnRTF depends on Html2Text and can not execute.</td></tr>'; $unrtfResults = false; } else { $unrtfResults = !(UNRTF_PATH != '' && !InstallationTests::checkUnrtf()); } if (!$antiwordResults || !$pdftotextResults) { echo '<script type="text/javascript">showTextBlock(\'testFailed\');</script>'; } else { echo '<script type="text/javascript">showTextBlock(\'testPassedParsing\');</script>'; } break; case 'optionalComponents': MySQLConnect(); initializeOptionalComponents(); echo '<script type="text/javascript">'; /* Detect date format preferences. */ $rs = MySQLQuery('SELECT date_format_ddmmyy FROM site', true); if ($rs) { $record = mysql_fetch_assoc($rs);
</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> </html>
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; } }