Bug 1248952

Summary: Error returns when run “php —version” inside php container
Product: OKD Reporter: Wenjing Zheng <wzheng>
Component: BuildAssignee: Ben Parees <bparees>
Status: CLOSED CURRENTRELEASE QA Contact: Wenjing Zheng <wzheng>
Severity: low Docs Contact:
Priority: medium    
Version: 3.xCC: libra-bugs
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: 2015-09-08 20:13:58 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 Wenjing Zheng 2015-07-31 08:07:39 UTC
Description of problem:
Below error appears when run “php —version” inside php container:
bash-4.2$ php —version
Failed loading /opt/rh/php54/root/usr/lib64/php/modules/opcache.so:  /opt/rh/php54/root/usr/lib64/php/modules/opcache.so: cannot open shared object file: No such file or directory
PHP 5.5.21 (cli) (built: Jun 10 2015 05:30:18) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

Version-Release number of selected component (if applicable):
virt-openshift-08.lab.eng.nay.redhat.com:5000/openshift3/php-55-rhel7  3c7c6d0b0451

How reproducible:
always

Steps to Reproduce:
1. STI build your own php image with php app source using based image openshift/php-55-rhel7
$ sti build https://github.com/openshift/sti-php.git  registry.access.redhat.com/openshift3/php-55-rhel7 --context-dir="5.5/test/test-app" my-php-image
2. Run the output image from above named "my-php-image" with using random uid like 33333
(Note: the uid should be between 0 and 4294967295 [2^32-1])
$ docker run -d  my-php-image
3. Access the container, check the uid and create some files
$ docker exec -ti <container_id> /bin/bash
bash-4.2$php —version

Actual results:
Errors appear:
Failed loading /opt/rh/php54/root/usr/lib64/php/modules/opcache.so: /opt/rh/php54/root/usr/lib64/php/modules/opcache.so: cannot open shared object file: No such file or directory

Expected results:
Should have no such error

Additional info:
No such issue when simply execute below command:
docker run -ti virt-openshift-08.lab.eng.nay.redhat.com:5000/openshift3/php-55-rhel7 /bin/bash

Comment 1 Ben Parees 2015-07-31 16:52:33 UTC
i could not reproduce this but there was a bad path in the ini file which i've fixed here, hopefully it resolves it for you:
https://github.com/openshift/sti-php/pull/43

Comment 2 Ben Parees 2015-07-31 17:20:31 UTC
ok i did reproduce it, that PR seems to fix it.

Comment 3 Wenjing Zheng 2015-08-04 05:51:51 UTC
Verified with below images, and no such error appears.
openshift/php-55-rhel7 9b54d9c280b3
openshift/php-55-centos7 c4d665e94417