Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/install/setup_1.php
<?php
/* +----------------------------------------------------------------------+
   | Netautor Professional Application Server                             |
   +----------------------------------------------------------------------+
   | Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net>      |
   +----------------------------------------------------------------------+
   | This file is subject to license, that is bundled with this package   |
   | in the file LICENSE.TXT, and is available at through the             |
   | world-wide-web at http://www.netautor.com/license/                   |
   |                                                                      |
   | If you did not receive a copy of the license and are unable to       |
   | obtain it through the world-wide-web, please send a note to          |
   | hide@address.com so we can mail you a copy.                      |
   +----------------------------------------------------------------------+
   | Authors: Stefan Rottensteiner <hide@address.com>    |
   |          Marek  Kadziela      <hide@address.com>	      |
   |          Gregor Wollner                                              |
   |          Helli  Kleinhans     								          |
   +----------------------------------------------------------------------+ */

/**
 * Show & check PHP configuration
 *
 * @author Stefan Rottensteiner
 * @version $Revision: 1.34 $
 */
require_once ('./setup.inc'); 
if (empty($_POST['SETUP_CHECK']) || file_exists('../../../config/base.php'))
{
	Header('Location: ../../index.php');
	exit();
}

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title><?php echo SOFTWARE_NAME_FULL;?> <?php echo SOFTWARE_VERSION_FULL;?> Setup Step 1</title>
	<meta name="Description" content="<?php SOFTWARE_NAME_FULL;?> <?php echo SOFTWARE_VERSION_FULL;?> Setup Step 1">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Expires" content="0">
	<meta name="robots" content="noindex,nofollow">
	<link href="../../include/netautor.css" rel="stylesheet" type="text/css" src="../../include/netautor.css">
</head>
<script language="JavaScript" type="text/javascript">
function goOn(SiteName,ConfirmText)
{
	if ((ConfirmText && ConfirmText!="") && (!confirm(ConfirmText))) return;
	document.forms[0].action=SiteName;
	document.forms[0].submit();
}
parent.frames['SETUP_HEAD'].document.setTitle('<?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step'],array('%1'=>'1','%2'=>'7')));?>');
</script>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="1" topmargin="1" >
<form method="post" action="setup_1.php">
<?php 
	if (isset($_POST['CONFIG_ERRORS'])) unset($_POST['CONFIG_ERRORS']);
	echo(setup_getMyVars($_POST));
	if (empty($SERVER_NAME)) $SERVER_NAME	=getenv('SERVER_NAME');
	if (empty($SERVER_NAME)) $SERVER_NAME	=$GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'];
	if (empty($SERVER_NAME)) @$SERVER_NAME	=$_SERVER['SERVER_NAME'];
	if (empty($SERVER_NAME)) $SERVER_NAME	='&lt; NOT AVAILABLE gt&;';

	if (empty($SERVER_PORT)) $SERVER_PORT	=getenv('SERVER_PORT');
	if (empty($SERVER_PORT)) $SERVER_PORT	=$GLOBALS['HTTP_SERVER_VARS']['SERVER_PORT'];
	if (empty($SERVER_PORT)) @$SERVER_PORT	=$_SERVER['SERVER_PORT'];
	if (empty($SERVER_PORT)) $SERVER_PORT	='80';

	if (empty($SERVER_SOFTWARE)) $SERVER_SOFTWARE=getenv('SERVER_SOFTWARE');
	if (empty($SERVER_SOFTWARE)) $SERVER_SOFTWARE=$GLOBALS['HTTP_SERVER_VARS']['SERVER_SOFTWARE'];
	if (empty($SERVER_SOFTWARE)) @$SERVER_SOFTWARE=$_SERVER['SERVER_SOFTWARE'];
	if (empty($SERVER_SOFTWARE)) $SERVER_SOFTWARE='&lt; NOT AVAILABLE gt&;';

	/* Meldung zeigen + Flag ob eine schwerer Feherl aufgetreten ist */
	$note_admin	= false;
?>
<br>
<br>
<table border="0" cellspacing="0" cellpadding="0" align="center" valign="top" >
	<tr>
	<td align="center" valign="top" colspan="3">
		<table width="700" border="0" align="center" class="bgwindow700">
		<tr>
			<td  colspan="4" align="left" valign="top" class="head">
				<img src="../../grafik/pixel.gif" width="1" height="7"><br>			
				<?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['title']); ?><br>
			</td>
		</tr>		
			<tr> 
				<td valign="top" class="text" width="50%"><?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['server_name']); ?></td>			
				<td valign="top" class="text" colspan="3"><?php echo($SERVER_NAME); if (!empty($SERVER_PORT)) echo ':'.$SERVER_PORT; ?></td>
			</tr>
			<tr>
				<td valign="top" class="text" width="50%" ><?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['server_software']); ?></td>			
				<td valign="top" class="text" colspan="3"><?php echo($SERVER_SOFTWARE);?></td>
			</tr>
			<tr>
				<td valign="top" class="text" width="50%"><?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['zend_version']); ?></td>			
				<td valign="top" class="text" colspan="3"><?php echo(zend_version());?></td>		
			</tr>			
		</table>
		<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<!------------------------------  CUT FROM HERE ----------------------------->		
		<?php 
			$extensions 		= ' '.strtoupper(implode(';',get_loaded_extensions()));
			$failed_extensions 	= array();	// Fehlende PHP-Extensions
			$overruled_options  = array();	// Falsche aber zur Laufzeit ├╝berschriebene Optionen
			$failed_options		= array();	// Falsche Optionen

		?>
		<table class="bgwindow700" width="700" border="0" align="center" >

			<tr>
				<td valign="top"class="text" width="50%"><b><?php echo($SETUP_LANGUAGE_TEXT['php_check_required']); ?></b></td>
				<td valign="top"class="text" width="20%"><b><?php echo $SETUP_LANGUAGE_TEXT['setup_step_1']['check_recommended']; ?></b></td>
				<td valign="top"class="text" width="20%"><b><?php echo $SETUP_LANGUAGE_TEXT['setup_step_1']['check_current']; ?></b></td>
				<td valign="top"class="text" width="10%"></td>
			</td>
			<tr>
				<td valign="top"class="text" width="50%"><?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['php_version']); ?></td>			
				<td valign="top" width="20%" ><span class="text">4.2.2<br></span></td>
				<?php 
				if (intval(str_replace('.','',phpversion()))>40)
				{
					?>
						<td valign="top" width="20%"><span class="textgreen"><?php echo phpversion(); ?><br></span></td>
						<td valign="top" width="10%"><span class="textgreen"><?php echo $SETUP_LANGUAGE_TEXT['okay']; ?><br></span></td>
					<?php 
				}
				else
				{
					$note_admin = true;
					?>
						<td valign="top" width="30%" colspan="2" >
							<span class="textred"><?php echo $SETUP_LANGUAGE_TEXT['error_msg']['php_version']; ?><br></span>
						</td>
					<?php 
				}
				?>
			</tr>
			<tr>
				<td width="50%" class="text" valign="top"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_extension'],array('%1%'=>'XML'))); ?></td>
				<td width="20%" valign="top"><span class="text"><?php echo $SETUP_LANGUAGE_TEXT['installed']; ?></span></td>
				<td width="20%" valign="top"><?php 
					if (strpos($extensions,'XML')) {
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['installed']);
						$test_passed	= true;
					}
					else {
						$failed_extensions['XML']=true;
						echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['notinstalled'].' *)');
						$test_passed	= true;
					}
					?></span></td>
				<td width="10%"><?php 
					echo ( $test_passed	? '<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['okay'].'</span>' : '<span class="textred">'.$SETUP_LANGUAGE_TEXT['error'].'</span>' );
				?></td>
			</tr>
			<tr>
				<td class="text" valign="top"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_extension'],array('%1%'=>'PCRE'))); ?></td>
				<td valign="top"><span class="text"><?php echo $SETUP_LANGUAGE_TEXT['installed']; ?></span></td>
				<td valign="top"><?php 
					if (strpos($extensions,'PCRE')) {
						$test_passed = true;
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['installed']);
					}
					else {
						$failed_extensions['PCRE']=true;
						$test_passed	 = false;
						echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['notinstalled'].' *)');
					}
					?></span></td>
				<td valign="top"><?php 
					echo ( $test_passed	? '<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['okay'].'</span>' : '<span class="textred">'.$SETUP_LANGUAGE_TEXT['error'].'</span>' );
				?></td>
			</tr>			
			<tr>
				<td class="text" valign="top"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_extension'],array('%1%'=>'Sessions'))); ?></td>
				<td valign="top"><span class="text"><?php echo $SETUP_LANGUAGE_TEXT['installed']; ?></span></td>
				<td  valign="top"><?php 
					if (strpos($extensions,'SESSION')) {
						$test_passed	= true;
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['installed']);
					}
					else {
						$failed_extensions['SESSION']=true;
						$test_passed	= false;
						echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['required'].' *)');
					}
					?></span></td>
				<td valign="top"><?php 
					echo ( $test_passed	? '<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['okay'].'</span>' : '<span class="textred">'.$SETUP_LANGUAGE_TEXT['error'].'</span>' );
				?></td>
			</tr>
			<tr>
				<td class="text" valign="top"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_setting'],array('%1%'=>'register_globals'))); ?></td>
				<td valign="top"><span class="text"><?php echo($SETUP_LANGUAGE_TEXT['set']); ?></span></td>				
				<td valign="top"><?php 
					$old = ini_get('register_globals');
					if ($old=='1' || $old == 'on' ) {
						$test_passed	= true;
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['set'].'</span>');
					}
					else {
						$failed_options['mq_regglob']=true;
						$test_passed	= false;
						echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['unset'].' ***)</span>');
					}
				?></td>
				<td valign="top"><?php 
					echo ( $test_passed	? '<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['okay'].'</span>' : '<span class="textred">'.$SETUP_LANGUAGE_TEXT['error'].'</span>' );
				?></td>
			</tr>
			<tr>
				<td class="text" valign="top"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_setting'],array('%1%'=>'magic_quotes_runtime'))); ?></td>
				<td valign="top"><span class="text"><?php echo($SETUP_LANGUAGE_TEXT['unset']); ?></span></td>
				<td  valign="top"><?php 
					$old = ini_set('magic_quotes_runtime',0);
					if (!$old || empty($old) || $old == 'off') {
						$test_passed = true;
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['unset'].'</span>');
					}
					else {
						$failed_options['mq_r']=true;
						$test_passed	= false;
						echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['set'].' ***)</span>');
					}
				?></td>
				<td  valign="top"><?php 
					echo ( $test_passed	? '<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['okay'].'</span>' : '<span class="textred">'.$SETUP_LANGUAGE_TEXT['error'].'</span>' );
				?></td>
			</tr>
			<tr>
				<td valign="top" class="text"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_setting'],array('%1%'=>'magic_quotes_sybase'))); ?></td>
				<td valign="top"><span class="text"><?php echo($SETUP_LANGUAGE_TEXT['unset']); ?></span></td>				
				<td valign="top" ><?php 
					$old = ini_set('magic_quotes_sybase',0);
					if (!$old || empty($old))
					{
						$test_passed = true;
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['unset'].'</span>');
					}
					else {
						$new = ini_get('magic_quotes_sybase');
						if (empty($new)) {
							$test_passed = true;
							echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['set'].' **)</span>');
							$overruled_options['mq_s']=1;
						}
						else {
							$failed_options['mq_s']=true;
							$test_passed	= false;
							echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['set'].' ***)</span>');
						}
					}
				?></td>
				<td valign="top"><?php 
					echo ( $test_passed	? '<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['okay'].'</span>' : '<span class="textred">'.$SETUP_LANGUAGE_TEXT['error'].'</span>' );
				?></td>				
			</tr>
		</table>
		<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
		<table class="bgwindow700" width="700" border="0" align="center" >
			<tr>
				<td colspan="4" align="left" class="text" ><b><?php echo($SETUP_LANGUAGE_TEXT['php_check_recommended']); ?></b></td>
			</tr>
			<tr>
				<td width="50%" class="text" valign="top"><?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['zend_optimizer']); ?></td>
				<td width="20%" valign="top"><span class="text"><?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['optional']); ?></span></td>
				<td width="20%" class="textgreen" valign="top"><?php 
					echo( ( strpos($extensions,'ZEND OPTIMIZER')===false ? '<span class="textred">'.$SETUP_LANGUAGE_TEXT['notinstalled'] : '<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['installed'] ));
					?></span></td>
				<td width="10%" valign="top"></td>
			</tr>
			<tr>
				<td class="text" valign="top"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_extension'],array('%1%'=>'ZLIB'))); ?></td>
				<td valign="top"><span class="text"><?php echo ($SETUP_LANGUAGE_TEXT['setup_step_1']['optional']); ?></span></td>				
				<td class="textgreen" valign="top"><?php 
					if (strpos($extensions,'ZLIB')) {
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['installed']);
					}
					else {
						echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['notinstalled']);
					}
					?></span></td>
				<td valign="top"></td>
			</tr>			
			<tr>
				<td class="text" valign="top"><?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step_1']['php_setting'],array('%1%'=>'safe_mode'))); ?></td>
				<td valign="top"><span class="text"><?php echo($SETUP_LANGUAGE_TEXT['unset']); ?></span></td>				
				<td valign="top" ><?php 
					$old = ini_get('safe_mode');
					ini_set('safe_mode','Off');
					if (!$old || empty($old) || $old=='off') {
						echo('<span class="textgreen">'.$SETUP_LANGUAGE_TEXT['unset'].'</span>');
					}
					else {
						echo('<span class="textred">'.$SETUP_LANGUAGE_TEXT['set'].'</span>');
					}
				?></td>
				<td valign="top"></td>
			</tr>
		</table>
		<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<!------------------------------  CUT UP TO THERE ----------------------------->		
	<?php 
		if ( $note_admin || (!(empty($failed_extensions) && empty($failed_options) && empty($overruled_options) )) )
		{
		?>
		<table class="bgwindow700" width="700" border=0 align="center" >
			<tr>
				<td class="head"><?php echo $SETUP_LANGUAGE_TEXT['summary'];?></td>
			</tr>
			<?php
				/* Adminsitrator-Meldung bei schweren Fehlern */

				if (!empty($failed_extensions))
				{
					$note_admin	= true;
					echo("<tr><td  class='textred'>*) ".$SETUP_LANGUAGE_TEXT['missing_extension']."<br></td></tr>");
				}

				if (!empty($overruled_options))	
				{
					echo("<tr><td class='textred'>**) ".$SETUP_LANGUAGE_TEXT['php_check_nearly_failed']."<br></td></tr>");
				}

				if (!empty($failed_options))
				{
					$note_admin	= true;
					if (empty($overruled_options))
					{
						echo("<tr><td class='textred'>***) ".$SETUP_LANGUAGE_TEXT['php_check_failed']."<br></td></tr>");
					}
					else
					{
						echo("<tr><td class='textred'>***) ".$SETUP_LANGUAGE_TEXT['php_check_failed_2']."<br></td></tr>");
					}
				}

				if ($note_admin	== true) 	
				{
					echo("<tr><td class='textred'>".$SETUP_LANGUAGE_TEXT['note_admin']."<br></td></tr>");
				}
			?>
		</table>
		<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>		
		<?php
		}
		?>
		<table class="bgwindow700" width="700" border=0 align="center" >
			<tr>
				<td class="head" width="33%" align="center" >
					<input type="button" class="create" value="<?php echo ($SETUP_LANGUAGE_TEXT['back']);?>" onClick="goOn('setup.php');" >
				</td>
				<td class="head" width="34%" align="center" >
					<input type="button" class="preview" value="<?php echo ($SETUP_LANGUAGE_TEXT['cancel']);?>" onClick="goOn('setup.php');" >				
				</td>				
				<td class="head" width="33%" align="center" >
					<?php if ($note_admin	== true) : ?>
							 <!--
								Remove comments around this HTML-Button to overrule all the security checks. 
								It's your own risk !!
							<input type="button" class="create" value="<?php echo ($SETUP_LANGUAGE_TEXT['next']);?>" onClick="x='';if(document.forms[0].elements['CONFIG_ERRORS'].value =='1' ) {x='<?php echo($SETUP_LANGUAGE_TEXT['setup_step_1']['confirm_next']); ?>';}; goOn('setup_2.php',x);"  >							
							-->
					<?php else :?> 
							<input type="button" class="create" value="<?php echo ($SETUP_LANGUAGE_TEXT['next']);?>" onClick="x='';if(document.forms[0].elements['CONFIG_ERRORS'].value =='1' ) {x='<?php echo($SETUP_LANGUAGE_TEXT['setup_step_1']['confirm_next']); ?>';}; goOn('setup_2.php',x);"  >					
					<?php endif; ?>
				</td>
			</tr>
		</table>
		<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>				
	</td>	
	</tr>
</table>
		<input type="hidden" name="CONFIG_ERRORS" value="<?php if ($note_admin) echo(1);?>">		
</form>
</body>
</html>
Return current item: Netautor Professional