0

我使用 RHEL 在一台新机器上部署了我的 SF2 应用程序。

“apache”下的 Check.php 表示缓存/日志的访问权限很好。

但是,当调用 app.php 或 app_dev.php 时,我得到一个空白响应,来自 app.php 的错误代码为 500,来自 app_dev.php 的错误代码为 200。

app/logs 中没有创建日志文件。

这是为“apache”用户运行的 check.php 输出:

******************************** 
* * * Symfony requirements check * * * 
******************************** 
php.ini used by PHP: /etc/php.ini 

** WARNING ** 
* The PHP CLI can use a different php.ini file 
* than the one used with your web server. 
* If this is the case, please ALSO launch this 
* utility from your web server. 
** WARNING ** 

** Mandatory requirements ** OK 
Checking that PHP version is at least 5.3.2 (5.3.3 installed) OK 
Checking that the "date.timezone" setting is set OK 
Checking that app/cache/ directory is writable OK 
Checking that the app/logs/ directory is writable OK 
Checking that the json_encode() is available OK 
Checking that the SQLite3 or PDO_SQLite extension is available OK 
Checking that the session_start() is available OK 
Checking that the ctype_alpha() is available OK 
Checking that the token_get_all() is available OK 
Checking that the APC version is at least 3.0.17 ** Optional checks ** OK 
Checking that the PHP-XML module is installed OK 
Checking that the token_get_all() function is available [[WARNING]] 
Checking that the mb_strlen() function is available: FAILED *** Install and enable the mbstring extension *** OK 
Checking that the iconv() function is available OK 
Checking that the utf8_decode() is available [[WARNING]] 
Checking that the posix_isatty() is available: FAILED *** Install and enable the php_posix extension (used to colorized the CLI output) *** [[WARNING]] 
Checking that the intl extension is available: FAILED *** Install and enable the intl extension (used for validators) *** OK 
Checking that a PHP accelerator is installed OK 
Checking that php.ini has short_open_tag set to off OK 
Checking that php.ini has magic_quotes_gpc set to off OK 
Checking that php.ini has register_globals set to off OK 
Checking that php.ini has session.auto_start set to off ** Optional checks (Doctrine) ** OK 
Checking that PDO is installed OK 
Checking that PDO has some drivers installed: pgsql, sqlite

编辑

感谢您的所有提示-但遗憾的是没有效果...

  • .htaccess 正在工作
  • mod_rewrite 已启用
  • display_errors 开启
  • apache日志显示没有错误
  • AppKernel 路径很好
  • app_dev.php 中的 $kernel->loadClassCache() 可以(我在该行之后得到一个输出echo ,但处理后没有响应
4

2 回答 2

0

这是我的错 - 我使用的是 ldap 包,但没有安装 php ldap 扩展。

对 ldap_connect 的调用以 @... 为前缀

于 2012-06-02T13:24:10.487 回答
0

检查 apache 日志 - 您可能会在其中找到它们

/var/log/apache2/errors.log

或者,如果您在虚拟主机中设置了自定义日志记录位置

/var/log/apache2/errors-your-project.log

调用 app_dev.php 可能会引发“您不允许从这里访问”错误,因为默认情况下它不允许从除本地主机之外的任何地方进行所有访问。

您的 apache 虚拟主机可能设置不正确。你会发现他们在

/etc/apache2/sites-available/your-project
于 2012-05-21T19:13:52.540 回答