Bug 1036526 - Zend-6.1 app does not load installed dependencies from $OPENSHIFT_DEPENDENCIES_DIR by default
Summary: Zend-6.1 app does not load installed dependencies from $OPENSHIFT_DEPENDENCIE...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Vojtech Vitek
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 09:06 UTC by Zhe Wang
Modified: 2015-05-15 00:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:51:30 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Zhe Wang 2013-12-02 09:06:32 UTC
Description of problem:
After installing a package to a zend-6.1 app, the app does not load the installed package by looking up $OPENSHIFT_DEPENDENCIES_DIR by default, causing the packages unusable. Moreover, a user needs to explicitly give the complete absolute path to load the package. On the other hand, there is no such problem for zend-5.6 apps.

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

How reproducible:
always

Steps to Reproduce:
1. create a zend-6.1 app

2. install a package to this app, for example, Validate-0.8.5 (the latest stable version)
echo "channel://pear.php.net/Validate-0.8.5" > deplist.txt

3. create a test page(dependency.php) under $APP_REPO/php to use the installed pakcage. In this step, we load the package with the relative path of the package.

<------dependency.php---->
<?php

// Here we use the relative path of the package
include "Validate.php";  

if (Validate::number(8.0004, array('decimal' => '.', 'dec_prec' => 4))) {
    echo 'version 1';
} else {
    echo "Invalid number";
}
?>

<------------------------>

4. push the change

5. visit the $APP_DNS/dependency.php page

6. load the package with the absolute path of the installed package:

include $_ENV[OPENSHIFT_DEPENDENCIES_DIR]."/pear/pear/php/Validate.php";

7. push the change and visit the dependency.php page again

Actual results:
In Step 5, it returns error 500 when visiting the test page. However, after loading the installed package with a absolute path, the page is accessible.

Expected results:
Zend-6.1 apps should look up installed packages from $OPENSHIFT_DEPENDENCIES_DIR by default.

Additional info:

Comment 1 Vojtech Vitek 2013-12-04 18:32:10 UTC
https://github.com/openshift/li/pull/2209

Comment 3 Zhe Wang 2013-12-09 03:46:32 UTC
Verified in devenv-stage_604.

The steps are identical to those in the description, and the output is:

[zhe@fedora zend611]$ curl zend611-stg604tst.dev.rhcloud.com/dependency.php
version 1


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