Bug 853563

Summary: CakePHP config: path to openshift.inc invalid
Product: OpenShift Online Reporter: N. Harrison Ripps <hripps>
Component: TemplatesAssignee: Vojtech Vitek <vvitek>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 2.xCC: agrimm, challgren, hripps
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-16 19:40:37 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:
Embargoed:

Description N. Harrison Ripps 2012-08-31 21:05:57 UTC
Description of problem:
See https://openshift.redhat.com/community/forums/openshift/problems-with-path-of-openshiftinc-cakephp

Steps to Reproduce:
1. Create CakePHP app
2. Browse app web page
3. Check error log on gear
  
Actual results:
Error log contains messages like:

[Fri Aug 31 16:37:24 2012] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required 'openshift.inc' (include_path='/var/www/wall/php/lib:.:/usr/share/php:/usr/share/pear') in /var/www/wall/php/app/Config/core.php on line 23
[Fri Aug 31 16:37:24 2012] [error] [client 127.0.0.1] PHP Warning:  require_once(openshift.inc): failed to open stream: No such file or directory in /var/www/wall/php/app/Config/core.php on line 23 

Expected results:
error log should not contain any errors related to the openshift.inc file.

Comment 1 N. Harrison Ripps 2012-08-31 21:06:23 UTC
Assigned.

Comment 2 N. Harrison Ripps 2012-08-31 21:27:23 UTC
Have asked community member for more info. I am not seeing this error in any of the normal log files when following the process above.

Comment 3 Chris Hallgren 2012-12-10 11:23:57 UTC
Possible resolutions.

1: A php cartridge should automatically include /libs/ in the repo folder.

Or

2: Modify Core.php and replace line require_once('openshift.inc'); with include(dirname(dirname(dirname(dirname(__FILE__)))) . DS . 'libs' . DS . 'openshift.inc');

Comment 4 Andy Grimm 2013-08-16 19:40:37 UTC
Fixed here (and merged long ago):

https://github.com/openshift/cakephp-example/pull/9