1

I tried to enable errors in PHP in openshift Cartridge , I was using openshift for past 4 months, everything goes well and with new Cartridge I cant able to enable errors to browser window

The code i used was

<?php
echo "Hello WOrld!";
echo "Hello world!;       //without ending quotes for error
?>

And the error i got by

tail -f /var/lib/openshift/54e9a8d74382ecd2be000161/app-root/php.log

[Wed Mar 11 12:42:31 2015] [error] [client 127.3.126.1] PHP Parse error:  syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /var/lib/openshift/54e9a8d74382ecd2be000161/app-root/runtime/repo/index.php on line 5
163.47.13.83 - - [11/Mar/2015:12:42:31 -0400] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0"

But in browser window it shows empty page ...

I having this issues for past 3 weeks , I tried lot of workarounds in the below links and nothing worked out

  1. PHP errors NOT being displayed in the browser [Ubuntu 10.10]
  2. PHP on OpenShift: How to enable errors and warnings?
  3. http://ubuntuforums.org/showthread.php?t=1593123

Note : After doing the changes in /var/lib/openshift/54e9a8d74382ecd2be000161/php/configuration/etc/php.ini and I restarted the application from the front end , ie the browser restart option, but nothing works.

Help me to fix this issue ...

4

1 回答 1

0

(对于任何仍然感兴趣的人)

使用调试环境:

rhc env set APPLICATION_ENV=development

根据文档,这将:

  • 在浏览器中显示更详细的错误
  • 显示启动错误
  • 启用 Xdebug PECL 扩展
  • 启用 APC 统计检查
  • 忽略您的 composer.lock 文件(如果适用)
于 2015-04-21T21:09:06.353 回答