Example #1
0
			
			</ul>
		</div>
		
		<div style="clear:both;background-color:#fff;padding: 20px 10px 20px 30px;border:0px;-webkit-box-shadow: rgba(0, 0, 0, 0.246094) 0px 4px 8px 0px;min-width:650px;float:left;width:650px;margin-left:10px;margin-bottom:50px;">
		<?php 
switch ($step) {
    case 1:
        $tests = array(0 => array("desc" => "PHP version 5 or higher", "test" => version_compare(PHP_VERSION, '5', 'ge'), "msg" => PHP_VERSION, "nomsg" => PHP_VERSION, "failmsg" => "FlexPaper requires a version of PHP greater than 4.3.7. The following versions of PHP are also not supported due to problems specific to those releases: 4.3.10 and 5.0.x", "sev" => 1), 1 => array("desc" => "Safe mode disabled", "test" => ini_get('safe_mode') == false || ini_get('safe_mode') == '' || strtolower(ini_get('safe_mode')) == 'off' || version_compare(PHP_VERSION, '5.4', 'ge'), "failmsg" => "<b>safe_mode</b> must be disabled in php.ini", "sev" => 1));
        exec_tests($tests);
        $table_data .= '<tr><td class="title">PHP can write to the config file</td>';
        $ini_file_name = 'config.ini.nix.php';
        if (PHP_OS == "WIN32" || PHP_OS == "WINNT") {
            $ini_file_name = 'config.ini.win.php';
        }
        if (is_writable($configManager->getConfigFilename())) {
            $table_data .= '<td class="pass">Yes</td>';
        } else {
            $table_data .= '<td class="fail">No</td>';
            $fatals++;
            if (PHP_OS == "WIN32" || PHP_OS == "WINNT") {
                array_push($fatal_msg, 'PHP does not have the ability to update the config file. Change the permissions on the config file (config/config.ini.win.php) and set its permissions to \'Modify\' and \'Write\' for \'Users\' / \'Everyone\' (see <a href=\'admin_files/images/config.ini.win.php.png\' target=\'_new\'>screen shot</a>). If you have any questions on how to set permissions, please contact your host.');
            } else {
                array_push($fatal_msg, 'PHP does not have the ability to update the config file. Change the permissions on the config folder and its contents to 777 and run the test again. If you have any questions on how to set permissions, please contact your host.');
            }
        }
        $table_data .= "</tr>";
        ?>
			<h3>FlexPaper Configuration: Server Requirements</h3>
			<table width="100%" cellspacing="0" cellpadding="0" class="sortable">
					<tr>