.htaccess 配置页面后出现500错误,设置带有子存储的magento
我已经创建了一个工作的magento站点,现在我正在尝试基于现有的工作站点创建一个测试环境。它位于同一服务器上,将位于不同的子域下 workingSubDomain.domain.com/store/ newSubDomain.domain.com/store/ 我保持子存储目录结构与工作站点相同 我已经检查并将所有文件夹设置为755,将app/etc/、media、var设置为777 单击安装向导配置页面上的“继续”后,我收到一个500错误 服务器日志文件显示以下内容:.htaccess 配置页面后出现500错误,设置带有子存储的magento,.htaccess,magento,installation,.htaccess,Magento,Installation,我已经创建了一个工作的magento站点,现在我正在尝试基于现有的工作站点创建一个测试环境。它位于同一服务器上,将位于不同的子域下 workingSubDomain.domain.com/store/ newSubDomain.domain.com/store/ 我保持子存储目录结构与工作站点相同 我已经检查并将所有文件夹设置为755,将app/etc/、media、var设置为777 单击安装向导配置页面上的“继续”后,我收到一个500错误 服务器日志文件显示以下内容: PHP Fatal e
PHP Fatal error: Call to a member function insert() on a non-object in /var/www/vhosts/domain.com/magentoFolder/subStore/app/code/core/Mage/Core/Model/Resource/Resource.php on line 133, referer: http://newSubDomain.domain.com/subStore/index.php/install/wizard/config/?config%5Blocale%5D=en_US&config%5Btimezone%5D=America%2FChicago&config%5Bcurrency%5D=USD
我在.htaccess文件夹中尝试了以下url重写:
RewriteEngine On
RewriteBase /clint/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /clint/index.php [L]
及
及
及
及
我还清除了var文件夹
如有任何建议,将不胜感激
以下是resource.php文件第133行中的代码:
* Set module version into DB
*
* @param string $resName
* @param string $version
* @return int
*/
public function setDbVersion($resName, $version)
{
$dbModuleInfo = array(
'code' => $resName,
'version' => $version,
);
if ($this->getDbVersion($resName)) {
self::$_versions[$resName] = $version;
return $this->_getWriteAdapter()->update($this->getMainTable(),
$dbModuleInfo,
array('code = ?' => $resName));
} else {
self::$_versions[$resName] = $version;
return $this->_getWriteAdapter()->insert($this->getMainTable(), $dbModuleInfo);
}
}
这不是apache错误,而是php错误。查看
/var/www/vhosts/domain.com/magentoFolder/subStore/app/code/core/Mage/core/Model/Resource/Resource.php
,第133行
可能是数据库连接错误。我接着又看了看。我正在经历Magento安装过程,它应该构建local.xml文件。此文件将具有连接设置。我只是使用localhost作为主机值
RewriteBase /magentoFolder/subStore/
RewriteBase /magentoFolder/
RewriteBase /subStore/
* Set module version into DB
*
* @param string $resName
* @param string $version
* @return int
*/
public function setDbVersion($resName, $version)
{
$dbModuleInfo = array(
'code' => $resName,
'version' => $version,
);
if ($this->getDbVersion($resName)) {
self::$_versions[$resName] = $version;
return $this->_getWriteAdapter()->update($this->getMainTable(),
$dbModuleInfo,
array('code = ?' => $resName));
} else {
self::$_versions[$resName] = $version;
return $this->_getWriteAdapter()->insert($this->getMainTable(), $dbModuleInfo);
}
}