Search code examples
openshiftfuelphp

Update composer.phar on Openshift


I have an application written in PHP using Fuelphp 1.6.3 and want to deploy it on Openshift

As the framework required composer, when I access my app at http://audit-manhthang.rhcloud.com/public/, it showed the error

Composer is not installed. Please run "php composer.phar update" in the root to install Composer

I have Google it and found an article here: https://www.openshift.com/content/support-for-git-clone-on-the-server-aka-support-php-composerphar I've tried to follow the instruction, create the file name deploy in .openshift/action_hooks folder and added following:

unset GIT_DIR
cd $OPENSHIFT_REPO_DIR/libs
wget -qN http://getcomposer.org/composer.phar
php composer.phar install

But it doesn't work. I have tried to revise install by update

unset GIT_DIR
cd $OPENSHIFT_REPO_DIR/libs
wget -qN http://getcomposer.org/composer.phar
php composer.phar update

But nothing change. I use PHP 5.3 Cartridge on Openshift


Solution

  • I figure it out. With openshift, I can access via SSH and go to app-root(or something like that)/repo/php and then type /usr/bin/php composer.phar update. That's it.