Bug 853563 - CakePHP config: path to openshift.inc invalid
Summary: CakePHP config: path to openshift.inc invalid
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Templates
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Vojtech Vitek
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-31 21:05 UTC by N. Harrison Ripps
Modified: 2015-05-15 02:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-16 19:40:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.