magento安装遇到的问题与解决

安装遇到的问题修改
1.将errors/local.xml.sample 文件名改为local.xml
2.php配置文件中修改max_execution_time 改为10000或者更大
3.安装过程中要将url,从localhost改为127.0.0.1
4.修改 magento\app\code\core\Mage\Core\Model\Store.php
public function isCurrentlySecure()
    {
        $standardRule = !empty($_SERVER['HTTPS']) && ('off' != $_SERVER['HTTPS']);
        $offloaderHeader = trim((string) Mage::getConfig()->getNode(self::XML_PATH_OFFLOADER_HEADER, 'default'));

        if ((!empty($offloaderHeader) && !empty($_SERVER[$offloaderHeader])) || $standardRule) {
            return true;
        }

        if (Mage::isInstalled()) {
            $secureBaseUrl = '';
            if (!$this->isAdmin()) {
                $secureBaseUrl = Mage::getStoreConfig(Mage_Core_Model_Url::XML_PATH_SECURE_URL);
            } else {
                $secureBaseUrl = (string) Mage::getConfig()
                    ->getNode(Mage_Core_Model_Url::XML_PATH_SECURE_URL, 'default');
            }

            if (!$secureBaseUrl) {
                return false;
            }

           $url_this = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];//$secureBaseUrl updated by samzheng
             $uri = Zend_Uri::factory($url_this);//$secureBaseUrl updated by samzheng
             $port = $uri->getPort();
             $isSecure = ($uri->getScheme() == 'https')
                 && isset($_SERVER['SERVER_PORT'])
                 && ($port == $_SERVER['SERVER_PORT']);
             return $isSecure;
        } else {
            $isSecure = isset($_SERVER['SERVER_PORT']) && (443 == $_SERVER['SERVER_PORT']);
            return $isSecure;
        }
    }

上面红色部分为替换代码
5.如果要重新安装把\app\etc中local.xml文件删除即可

你可能感兴趣的:(magento安装遇到的问题与解决)