duanchun1909 2015-03-11 16:59
浏览 50

在Openshift PHP中启用错误

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 ...

  • 写回答

1条回答 默认 最新

  • duanfu7994 2015-04-21 21:09
    关注

    (For anyone still interested)

    Use the debug environment:

    rhc env set APPLICATION_ENV=development
    

    This will, according to the documentation:

    • Show more detailed errors in browser
    • Display startup errors
    • Enable the Xdebug PECL extension
    • Enable APC stat check
    • Ignore your composer.lock file (if applicable)
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度