نمایش نتایج: از شماره 1 تا 5 , از مجموع 5

موضوع: مشکل در نصب شیر ترانیکس فارسی!

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #4
    عضو انجمن mha1368 آواتار ها
    تاریخ عضویت
    May 2009
    نوشته ها
    284
    تشکر تشکر کرده 
    801
    تشکر تشکر شده 
    287
    تشکر شده در
    215 پست

    پیش فرض پاسخ : مشکل در نصب شیر ترانیکس فارسی!

    خدمت شما:


    جزئی:

    اینو:
    کد:
    		'is_apache'			=> FALSE,
    با این جایگزین کردم:

    کد:
    		'is_apache'			=> TRUE,



    کامل:
    کد:
    <?php
    	
    	$PAGE_TITLE	= 'Installation - Step 3';
    	
    	$s	= & $_SESSION['INSTALL_DATA'];
    	
    	$texts	= array (
    		'is_apache'			=> 'Apache HTTP Server 
    
    required',
    		'apache_mod_rewrite'	=> 'Apache: mod_rewrite module 
    
    required',
    		'mysql_version_5'		=> 'MySQL: version 5.0 or 
    
    higher required',
    		'php_version_51'		=> 'PHP: version 5.1 or 
    
    higher required',
    		'php_curl_or_urlfopen'	=> 'PHP: cURL is needed, or else 
    
    "allow_url_fopen" directive should be On',
    		'php_short_open_tag_on'	=> 'PHP: "short_open_tag" 
    
    directive should be On',
    		'php_gd'			=> 'PHP: gd extension 
    
    required',
    	);
    	
    	$check	= array (
    		'is_apache'			=> TRUE,
    		'apache_mod_rewrite'	=> FALSE,
    		'mysql_version_5'		=> FALSE,
    		'php_version_51'		=> FALSE,
    		'php_curl_or_urlfopen'	=> FALSE,
    		'php_short_open_tag_on'	=> FALSE,
    		'php_gd'			=> FALSE,
    	);
    	
    	
    	if( function_exists('apache_get_version') ) {
    		$check['is_apache']		= TRUE;
    	}
    	elseif( isset($_SERVER['SERVER_SIGNATURE']) && preg_match
    
    ('/Apache/i', $_SERVER['SERVER_SIGNATURE']) ) {
    		$check['is_apache']		= TRUE;
    	}
    	elseif( isset($_SERVER['SERVER_SOFTWARE']) && preg_match
    
    ('/Apache/i', $_SERVER['SERVER_SOFTWARE']) ) {
    		$check['is_apache']		= TRUE;
    	}
    	
    	$tmp	= floatval(substr(phpversion(), 0, 3));
    	if( $tmp >= 5.1 ) {
    		$check['php_version_51']	= TRUE;
    	}
    	
    	$tmp	= my_mysql_connect($s['MYSQL_HOST'], $s['MYSQL_USER'], 
    
    $s['MYSQL_PASS']);
    	if( $tmp ) {
    		$tmp	= my_mysql_get_server_info($tmp);
    		$tmp	= str_replace('.','',substr($tmp, 0, 5));
    		$tmp	= intval($tmp);
    		if( $tmp >= 500 ) {
    			$check['mysql_version_5']	= TRUE;
    		}
    	}
    	
    	if( function_exists('gd_info') ) {
    		$check['php_gd']	= TRUE;
    	}
    	
    	if( function_exists('curl_init') ) {
    		$check['php_curl_or_urlfopen']	= TRUE;
    	}
    	else {
    		$tmp	= intval(ini_get('allow_url_fopen'));
    		if( $tmp == 1 ) {
    			$check['php_curl_or_urlfopen']	= TRUE;
    		}
    	}
    	
    	$tmp	= intval(ini_get('short_open_tag'));
    	if( $tmp == 1 ) {
    		$check['php_short_open_tag_on']	= TRUE;
    	}
    	
    	if( function_exists('apache_get_modules') ) {
    		$tmp	= @apache_get_modules();
    		if( is_array($tmp) ) {
    			foreach($tmp as $mod) {
    				if( $mod != 'mod_rewrite' ) {
    					continue;
    				}
    				$check['apache_mod_rewrite']	= TRUE;
    				break;
    			}
    		}
    	}
    	if( !$check['apache_mod_rewrite'] ) {
    		ob_start();
    		phpinfo(8);
    		$tmp	= ob_get_contents();
    		ob_get_clean();
    		if( ! empty($tmp) ) {
    			$pos	= strpos($tmp, 'Loaded Modules');
    			if( FALSE !== $pos ) {
    				$tmp	= substr($tmp, $pos);
    				$pos	= strpos($tmp, '</table>');
    				if( FALSE !== $pos ) {
    					$tmp	= substr($tmp, 0, $pos);
    					if( preg_match
    
    ('/mod_rewrite/ius', $tmp) ) {
    						$check
    
    ['apache_mod_rewrite']	= TRUE;
    					}
    				}
    			}
    		}
    	}
    	if( !$check['apache_mod_rewrite'] ) {
    		$url	= 'http://'.$_SERVER['HTTP_HOST'].$_SERVER
    
    ['REQUEST_URI'];
    		$pos	= strpos($url, 'install');
    		if( FALSE !== $pos ) {
    			$url	= rtrim(substr($url, 0, $pos
    
    +8),'/').'/etc/modrewritetest/';
    			$tmp1	= @file_get_contents($url.'test1.txt');
    			$tmp2	= @file_get_contents($url.'test2.txt');
    			if( $tmp1=='123' && $tmp2!='123' ) {
    				$check['apache_mod_rewrite']	= TRUE;
    			}
    		}
    	}
    	
    	$error	= FALSE;
    	foreach($check as $tmp) {
    		if( ! $tmp ) {
    			$error	= TRUE;
    			break;
    		}
    	}
    	
    	if( ! $error ) {
    		$_SESSION['INSTALL_STEP']	= 3;
    		header('Location: ?next&r='.rand(0,99999));
    	}
    	
    	$html	.= '
    							<div class="ttl">
    								<div 
    
    class="ttl2">
    									
    
    <h3>System Compatibility Check</h3>
    								</div>
    							</div>';
    	if( $error ) {
    		$html	.= errorbox('Not Compatible', 'Please correct the 
    
    highlighted settings and hit "Refresh".', FALSE, 'margin-top:5px;margin-
    
    bottom:0px;');
    		$_SESSION['INSTALL_STEP']	= 2;
    	}
    	
    	$html	.= '
    							<div 
    
    class="greygrad" style="margin-top: 5px;">
    								<div 
    
    class="greygrad2">
    									
    
    <div class="greygrad3" style="padding-top:0px;">
    										
    
    <table cellpadding="5" style="width:100%;">';
    	foreach($check as $k=>$v) {
    		$txt	= $texts[$k];
    		$html	.= '
    										
    
    	<tr>
    										
    
    		<td colspan="2" style="font-size:0; line-height:0; 
    
    height: 0; padding: 0; border-bottom: 1px solid #efefef;"></td>
    										
    
    	</tr>
    										
    
    	<tr>
    										
    
    		<td style="'.($v?'':'color:red;font-weight:bold;').'">'.
    
    $txt.'</td>
    										
    
    		<td style="text-align:right; font-weight:bold;">'.
    
    ($v?'<span style="color:#008506;">OK</span>':'<span 
    
    style="color:red;">FAIL</span>').'</td>
    										
    
    	</tr>';
    	}
    	$html	.= '
    										
    
    	<tr>
    										
    
    		<td colspan="2" style="font-size:0; line-height:0; 
    
    height: 0; padding: 0; border-bottom: 1px solid #efefef;"></td>
    										
    
    	</tr>
    										
    
    </table>';
    	
    	if( ! $error ) {
    		$html	.= '
    										
    
    <div style="margin-top:20px;">
    										
    
    	<a href="?next">&raquo; Continue</a>
    										
    
    </div>';
    	}
    	
    	$html	.= '
    									
    
    </div>
    								</div>
    							</div>';
    	
    ?>

  2. تعداد تشکر ها از mha1368 به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. پاسخ ها: 11
    آخرين نوشته: December 9th, 2015, 19:19
  2. پاسخ ها: 2
    آخرين نوشته: November 28th, 2013, 15:43
  3. پاسخ ها: 1
    آخرين نوشته: November 27th, 2013, 01:06
  4. پاسخ ها: 3
    آخرين نوشته: November 19th, 2013, 11:56

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •