"; echo "Checking pre-flight requirements... "; echo " 1..."; ini_set( 'display_errors', 1 ); //Try to display any errors that may arise on this page. ini_set( 'default_socket_timeout', 5 ); ini_set( 'allow_url_fopen', 1 ); echo " 2..."; if ( isset( $_GET['external_installer'] ) ) { $external_installer = (int)$_GET['external_installer']; } else { $external_installer = 0; } echo " 3..."; //$templates_c_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR .'..'. DIRECTORY_SEPARATOR .'..'. DIRECTORY_SEPARATOR .'templates_c'; echo " 4..."; $redir = true; if ( version_compare( PHP_VERSION, '8.0.0', '<' ) == 1 ) { //Also update CLI.inc.php for the minimum PHP version. echo "You are currently using PHP v" . PHP_VERSION . " TimeTrex requires PHP v8.0 or greater!

\n"; $redir = false; } if ( version_compare( PHP_VERSION, '8.1.99', '>' ) == 1 ) { echo "You are currently using PHP v" . PHP_VERSION . " TimeTrex requires PHP v8.1.x or earlier!

\n"; $redir = false; } echo " 5..."; //if ( !is_writeable($templates_c_dir) ) { // echo "". $templates_c_dir ." is NOT writable by your web server! For help on this topic click here.

\n"; // $redir = FALSE; //} echo " 6..."; //These are all extensions required to even initialize the HTML5 interface. //if ( extension_loaded( 'intl' ) == FALSE ) { // echo "PHP INTL extension is not installed, TimeTrex requires INTL to be installed.

\n"; // $redir = FALSE; //} if ( extension_loaded( 'gettext' ) == false ) { echo "PHP GetText extension is not installed, TimeTrex requires GetText to be installed.

\n"; $redir = false; } if ( extension_loaded( 'mbstring' ) == false ) { echo "PHP MBSTRING extension is not installed, TimeTrex requires MBSTRING to be installed.

\n"; $redir = false; } if ( extension_loaded( 'json' ) == false ) { echo "PHP JSON extension is not installed, TimeTrex requires JSON to be installed.

\n"; $redir = false; } echo " 7..."; //$test_template_c_sub_dir = $templates_c_dir . DIRECTORY_SEPARATOR . uniqid(); //if ( @mkdir( $test_template_c_sub_dir ) !== TRUE ) { // //If SELinux is installed, could try: chcon -t httpd_sys_content_t storage // echo "Your web server is unable to create directories inside of: ". $templates_c_dir .", please give your webserver write permissions to this directory. For help on this topic click here.

\n"; // $redir = FALSE; //} //echo " 8..."; //@rmdir( $test_template_c_sub_dir ); //unset($test_template_c_sub_dir); echo " 9..."; @file_get_contents( 'http://www.timetrex.com/pre_install.php?os=' . PHP_OS . '&php_version=' . PHP_VERSION . '&redir=' . (int)$redir . '&web_server=' . urlencode( substr( $_SERVER['SERVER_SOFTWARE'], 0, 20 ) ) . '&external_installer=' . $external_installer . '&url=' . urlencode( $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'] ), 'r' ); echo " 10..."; if ( $redir == true ) { echo " PASSED!

\n"; echo "Please wait while we automatically redirect you to the installer."; //echo ""; echo ""; } else { echo " FAILED!

\n"; echo "For installation support, please join our community forums or contact a TimeTrex support expert for Implementation Support Services.
\n"; } echo ""; ?>