关于睿艾科技

企业级电子商务及供应链解决方案


网店系统Magento安装环境要求

新闻添加时间:2016-03-19 8:11:45

以下是magento安装安装的最低环境要求,购买主机前请联系主机商确认是否支持magento。 通常国内windows都不支持magento
  • 服务器系统:
    • Linux x86, x86-64,window
  • Web服务器:
    • Apache 1.3.x
    • Apache 2.0.x
    • Apache 2.2.x
    • Nginx-不支持htaccess,需重写URL规则
  • 兼容浏览器:
    • Microsoft Internet Explorer 7 and above
    • Mozilla Firefox 3.5 and above
    • Apple Safari 5 and above on Mac only
    • Google Chrome 7 and above
    • Adobe Flash browser plug-in should be installed
  • PHP:
    • 5.2.13+
    • PHP扩展:
      • PDO_MySQL
      • simplexml
      • mcrypt
      • hash
      • GD
      • DOM
      • iconv
      • curl
      • SOAP (开启API功能时用到)
    • Safe_mode off
    • Memory_limit 最少 256Mb (preferably 512)
  • MySQL:
    • 4.1.20 以上
    • InnoDB 存储引擎
  • SSL:
    • 开启HTTPS需安装SSL服务
  • 服务器其他要求:
    • 可以配置自动执行程序如Cron
    • 可配置URL重写规则如:.htaccess
方提供了一个PHP脚步程序去自动检测服务器环境是否满足magento
脚本代码:
<?
extension_check(array( 
’curl’,
’dom’, 
’gd’, 
’hash’,
’iconv’,
’mcrypt’,
’pcre’, 
’pdo’, 
’pdo_mysql’, 
’simplexml’
));
 
function extension_check($extensions) {
$fail = ’’;
$pass = ’’;
 
if(version_compare(phpversion(), ’5.2.0’, ’<’)) {
$fail .= ’<li>You need<strong> PHP 5.2.0</strong> (or greater)</li>’;
}
else {
$pass .=’<li>You have<strong> PHP 5.2.0</strong> (or greater)</li>’;
}
 
if(!ini_get(’safe_mode’)) {
$pass .=’<li>Safe Mode is <strong>off</strong></li>’;
preg_match(’/[0-9]\.[0-9]+\.[0-9]+/’, shell_exec(’mysql -V’), $version);
 
if(version_compare($version[0], ’4.1.20’, ’<’)) {
$fail .= ’<li>You need<strong> MySQL 4.1.20</strong> (or greater)</li>’;
}
else {
$pass .=’<li>You have<strong> MySQL 4.1.20</strong> (or greater)</li>’;
}
}
else { $fail .= ’<li>Safe Mode is <strong>on</strong></li>’;  }
 
foreach($extensions as $extension) {
if(!extension_loaded($extension)) {
$fail .= ’<li> You are missing the <strong>’.$extension.’</strong> extension</li>’;
}
else{ $pass .= ’<li>You have the <strong>’.$extension.’</strong> extension</li>’;
}
}
 
if($fail) {
echo ’<p><strong>Your server does not meet the following requirements in order to install Magento.</strong>’;
echo ’<br>The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:’;
echo ’<ul>’.$fail.’</ul></p>’;
echo ’The following requirements were successfully met:’;
echo ’<ul>’.$pass.’</ul>’;
} else {
echo ’<p><strong>Congratulations!</strong> Your server meets the requirements for Magento.</p>’;
echo ’<ul>’.$pass.’</ul>’;
 
}
}
?>