【发布时间】:2013-10-25 08:52:17
【问题描述】:
我正在尝试在我的本地主机 wamp 服务器的实时服务器上运行一个 magento 商店。我正在使用带有 wamp 的 windows 7 x64,其中包括:Apache 2.2.22、PHP 5.3.13 和 MySQL 5.5.24。 这是我在尝试运行商店时遇到的以下错误:
Whoops, it looks like you have an invalid PHP version.
Magento supports PHP 5.2.0 or newer. Find out how to install Magento using PHP-CGI as a work-around.
'; exit; }
/** * Error reporting */
error_reporting( /*E_ALL | E_STRICT */ 0);
/** * Compilation includes configuration file */
define('MAGENTO_ROOT', getcwd()); $compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) { include $compilerConfig; } $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; $maintenanceFile = 'maintenance.flag'; if (!file_exists($mageFilename)) { if (is_dir('downloader')) { header("Location: downloader"); } else { echo $mageFilename." was not found"; } exit; } if (file_exists($maintenanceFile)) { include_once dirname(__FILE__) . '/errors/503.php'; exit; } require_once $mageFilename; #Varien_Profiler::enable(); if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { Mage::setIsDeveloperMode(true); } #ini_set('display_errors', 1); umask(0);
/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
/* Run store or run website */ $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; Mage::run($mageRunCode, $mageRunType);
在过去的一周里,我尝试做了以下事情:
- 为 php 版本安装了 php_curl 修复程序。 php_curl 扩展有效,因为当我安装新的 magento 副本时,它可以正常工作。
- 我检查了安装 Magento 的所有系统要求的列表,并且 php 扩展都在工作。
- 我将 php.ini 中的 memory_limit 从 128M 更改为 512M。
- 我将 app/etc 中的 local.xml 文件修改为指向我的 localhost 和 db_name、db_user、db_pass,这是我为这个商店创建的 localy。
- 我从本地数据库中的实时服务器导入了数据库,并修改了 core_config 表中的 base_url 选项
- 我打开了 apache 模块 headers_module、rewrite_module、include_module 和 php5_module。
- 我尝试将 .htaccess 编辑为 rewrite_base,但没有任何改变。
- 我尝试从 .htaccess AddType x-mapp-php5 .php 和 AddHandler x-mapp-php5 .php 从 .htaccess 中注释掉,但之后没有任何显示,所以我保留原样,未注释。
- 我使用了 4-5 个版本的 php 和 apache.. 但没有任何效果。
现在最后一件事.. 在我的 apache 错误日志中.. 我得到的最后一件事是以下行:
[Fri Oct 25 11:50:14 2013] [warn] Cannot get media type from 'x-mapp-php5'
请帮我解决这个问题。 提前感谢您的时间和帮助。
【问题讨论】:
-
你添加了虚拟主机来运行magento吗?如果是,请也复制一下
-
你看到的是Magento的
index.php的内容。很可能您的服务器上没有安装 PHP。 -
我添加了虚拟主机但没有工作,所以我将其修改回普通主机。主机看起来像这样:127.0.0.1 localhost/mysite @SKV
-
我在我的服务器上安装了 php,因为我正在使用 wamp 对其他东西进行编程,例如自定义 mvc、wordpress 和全新的 magento 安装。他们都工作正常@Marius
-
Dragos 这是来自主机文件的配置,你有没有在 xamp 的 vhost-httpd 文件中插入任何代码?
标签: php apache magento localhost