Symfony2 的虚拟主机出现 httpd.exe 无法读取内存的应用程序错误

Virtual host for Symfony2 got httpd.exe application error of memory could not be read

我有一个使用 MongoDB 的 Symfony2 应用程序。在其他两台 PC 上 运行ning 正常 - Windows 7 和 Linux。我正在将其迁移到新笔记本电脑中。它的环境是

我通过 运行ning php app/console server:runhttp://localhost:8000 成功 运行 申请。但是,我设置了虚拟主机,比方说 api-site.dev,当我 运行 http://api-site.dev 时,我遇到了 httpd.exe 应用程序错误和未完成的页面加载。

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot "D:\xampp\htdocs"
</VirtualHost>

<VirtualHost *:80>
    ServerName api-site.dev
    ServerAlias api-site.dev
    DocumentRoot "D:\xampp\htdocs\api-site\web"
</VirtualHost>

我必须设置虚拟主机,因为它是一个 API 服务器,需要从另一个带有 MySQL 数据库的 Symfony 应用程序调用。我为另一个应用程序 example.dev 添加了以下虚拟主机,运行 没问题。

<VirtualHost *:80>
    ServerName example.dev
    ServerAlias example.dev
    DocumentRoot "D:\xampp\htdocs\example\web"
</VirtualHost>

问题只存在于虚拟主机 api-site.dev。很奇怪,我不知道下一步该怎么做。

[更新]

我跟踪了 /web/app.php,发现问题出现在删除 die('hello') 时的 $response = $kernel->handle($request); 行。

$request = Request::createFromGlobals();
die('hello');
$response = $kernel->handle($request);
die('hi');
$response->send();
$kernel->terminate($request, $response);

可能是因为 XAMPP 7.0.13 with PHP 7.0.13 问题 Windows 10.
我通过安装 WampServer (x64) 3.0.6 解决了这个问题,其中包括

  • 阿帕奇 2.4.23
  • PHP 5.6.25 / 7.0.10
  • MySQL 5.7.14

我用 WAMP 重新配置了所有内容,现在工作正常。