Bug 1395349

Summary: Php Cartridge "display_errors" Not Working Correctly
Product: OpenShift Container Platform Reporter: Jack Ottofaro <jack.ottofaro>
Component: ImageStreamsAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED EOL QA Contact: Wang Haoran <haowang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.2.0CC: aos-bugs, erich, gpei, jokerman, mmccomas, rthrashe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-13 21:30:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jack Ottofaro 2016-11-15 17:59:49 UTC
Description of problem:

When you turn on display_errors, you are able to see them on your website as well as in the logs.

However, when the display_errors is turned off, the errors should still be logged in php.log (but not on the website any more) but they are not being logged in the the php.log file.

Please reference SNOW ticket #INC0468529 and support case # 01737290

Version-Release number of selected component (if applicable):


How reproducible:
Toggle "display_errors" off and note incorrect behaviour.

Steps to Reproduce:
1.Turn display_errors off
2.
3.

Actual results:
Errors are not only not displayed on web page but are also not logged in php.log file.

Expected results:
Errors should not be displayed on web page but should still get logged in php.log file.

Additional info:
Is there any workaround for this issue?

Comment 1 Eric Rich 2016-11-16 21:13:41 UTC
I don't see this as a bug because the cartridge, logs errors to standard out: 

https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-php/bin/control#L33

In short "display_errors" (on) simply has php errors / logs to standard out so that log_shifter can capture and log it to a file. 

In short a better solution would be to fix this at the drupal layer, and have the "watchdog" facility log directly to a file: https://www.drupal.org/sandbox/kpander/1986402

Comment 2 Rory Thrasher 2017-01-13 21:30:48 UTC
OpenShift Enterprise v2 has officially reached EoL.  This product is no longer supported and bugs will be closed.

Please look into the replacement enterprise-grade container option, OpenShift Container Platform v3.  https://www.openshift.com/container-platform/

More information can be found here: https://access.redhat.com/support/policy/updates/openshift/