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

Community
  • 1
  • 1
jeyanthinath
  • 841
  • 1
  • 10
  • 20

1 Answers1

0

(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)
Raphael Schweikert
  • 17,126
  • 5
  • 51
  • 67