John Mccandles
John Mccandles

Reputation: 1231

How can I replace Openshift's built-in php in Do-It-Yourself application?

I was trying to install PHP 5.6.11 into Openshift "Do-it-Yourself 0.1". After the installation, I restarted all the services via "ctl_all restart". But after that, when I run "php -v", it showed:

PHP 5.3.3 (cli) (built: Jul  3 2015 03:10:33)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.4, Copyright (c) 2002-2012, by Derick Rethans

How can I replace this built-in version of PHP with PHP 5.6.11? Thanks.

Upvotes: 0

Views: 476

Answers (2)

John Mccandles
John Mccandles

Reputation: 1231

I found this post: https://forums.openshift.com/permanently-add-to-path to permanently add new bin to PATH by etting the PATH variable in the app's pre_start action hook ($app/.openshift/action_hooks/pre_start_$apptype).

Hope it can help.

Upvotes: 1

user2879327
user2879327

Reputation:

You need to make sure that your new version's bin directory is specified in your PATH before the other version, that way it will pick up that php version first.

Upvotes: 0

Related Questions