Bug 971822 - PHP cartridge include path does not include user pear path
Summary: PHP cartridge include path does not include user pear path
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers   
(Show other bugs)
Version: 2.x
Hardware: Unspecified Unspecified
Target Milestone: ---
: ---
Assignee: Vojtech Vitek
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2013-06-07 10:47 UTC by Martin Kosek
Modified: 2015-05-14 23:21 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-11 04:18:39 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Martin Kosek 2013-06-07 10:47:21 UTC
Description of problem:
My mediawiki on OpenShift Online stacktraced when it tried to send a mail via PEAR's Mail package even though I have this dependency in app's deplist.txt:

#0 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/User.php(3391): UserMailer::send(Object(MailAddress), Object(MailAddress), 'FreeIPA email a...', 'Someone, probab...', NULL)
#1 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/User.php(3369): User->sendMail('FreeIPA email a...', 'Someone, probab...')
#2 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/specials/SpecialConfirmemail.php(79): User->sendConfirmationMail()
#3 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/specials/SpecialConfirmemail.php(54): EmailConfirmation->showRequestForm()
#4 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/SpecialPage.php(611): EmailConfirmation->execute(NULL)
#5 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/SpecialPageFactory.php(494): SpecialPage->run(NULL)
#6 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#7 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/Wiki.php(536): MediaWiki->performRequest()
#8 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/includes/Wiki.php(446): MediaWiki->main()
#9 /var/lib/openshift/<my-openshift-app-id>/app-root/runtime/repo/php/index.php(59): MediaWiki->run()
#10 {main}

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

How reproducible:

Steps to Reproduce:
1. Create an PHP based app in OpenShift online
2. Create deplist.txt in app git's root directory with one line "Mail"
3. Create an app
4. SSH to app and see if the requested Mail package is in PHP's include path (as it used to be before June 1-2)

Actual results:
It is not.

Expected results:
It is.

Additional info:

I workaround-ed the issue by updating PHP's include path in mediawiki's LocalSettings.php:

$path = '/var/lib/openshift/<my-openshift-app-id>/php/phplib/pear/pear/php';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

Comment 2 Meng Bo 2013-06-09 03:45:44 UTC
Checked on devenv-stage_369,

For php app, found the following line in the php/configuration/etc/conf.d/openshift.conf
php_value include_path ".:/var/lib/openshift/74539e1cd0b411e2b9dc22000a9a8ccd/app-root/runtime/repo//libs/:/var/lib/openshift/74539e1cd0b411e2b9dc22000a9a8ccd/php//phplib/pear/pear/php/:/usr/share/pear/"

And after install Mail package via deplist, the Mail package is placed under /php//phplib/pear/pear/php/
[mediawiki-bmengdev.dev.rhcloud.com 74539e1cd0b411e2b9dc22000a9a8ccd]\> ls php/phplib/pear/pear/php/
Auth  Mail  Mail.php  Net

Move bug to verified.

Comment 3 Jianwei Hou 2013-06-09 04:22:11 UTC
Also verified on STG
[php1-sprint25.stg.rhcloud.com 51b3f74adbd93c15ed000173]\> ls php/phplib/pear/pear/php/
Auth  Mail  Mail.php  Net

Comment 4 Jianwei Hou 2013-06-09 08:12:48 UTC
Verified this with v2 -> v2 migration, since devenv-stage_365 ami is wiped out from EC2, have to upgrade from devenv-stage_353 to 369, migrate from v1 to v2. Recreate the bug manually and fix it with migration

Steps(after instance is upgraded to devenv-stage_369 and cartridges are migrated to v2):
1. On node, modify the php/env/OPENSHIFT_PHP_IDENT , change value:
redhat:php:5.3:0.0.2 => redhat:php:5.3:0.0.1
2. Edit php/versions/shared/configuration/etc/conf.d/openshift.conf to the wrong value(which does not have the Mail pkg path)
php_value include_path ".:/var/lib/openshift/0f6d725ed0c111e29ebe22000a8dad5a/app-root/runtime/repo//libs/:/phplib/pear/pear/php/:/usr/share/pear/"

3. rhc-admin-migrate --version 2.0.28a
4. After migration is complete, ssh into gear, check the value of php_value again

After step 4:
The value is corrected in php/versions/shared/configuration/etc/conf.d/openshift.conf
php_value include_path ".:/var/lib/openshift/0f6d725ed0c111e29ebe22000a8dad5a/app-root/runtime/repo//libs/:/var/lib/openshift/0f6d725ed0c111e29ebe22000a8dad5a/php//phplib/pear/pear/php/:/usr/share/pear/"

Comment 5 Mrunal Patel 2013-06-14 15:10:25 UTC
*** Bug 973860 has been marked as a duplicate of this bug. ***

Comment 6 Dave Neary 2013-06-23 22:12:12 UTC

I'm still experiencing this (new) issue with the oVirt website. Fro now I've removed Mail from deplist to allow my application to start - with Mail in deplist, the cart build fails because "pear-Mail has no candidate to install".

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