Bug 1248952 - Error returns when run “php —version” inside php container
Error returns when run “php —version” inside php container
Product: OpenShift Origin
Classification: Red Hat
Component: Build (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Ben Parees
Wenjing Zheng
Depends On:
  Show dependency treegraph
Reported: 2015-07-31 04:07 EDT by Wenjing Zheng
Modified: 2015-09-08 16:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-09-08 16:13:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Wenjing Zheng 2015-07-31 04:07:39 EDT
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:

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 12:52:33 EDT
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:
Comment 2 Ben Parees 2015-07-31 13:20:31 EDT
ok i did reproduce it, that PR seems to fix it.
Comment 3 Wenjing Zheng 2015-08-04 01:51:51 EDT
Verified with below images, and no such error appears.
openshift/php-55-rhel7 9b54d9c280b3
openshift/php-55-centos7 c4d665e94417

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