LoginSignup
3
2

More than 5 years have passed since last update.

BluemixでPHP拡張モジュールを有効にする方法

Last updated at Posted at 2017-01-28

BluemixのPHP環境について

BluemixのCloud Foundry アプリ「PHP」は、デフォルトではmysql, mbstringなどの拡張モジュールが無効となっており、Bluemix上でphpMyAdminやWordPressを動かしたいと思ったときに筆者がつまずくポイントになりました。

PHP拡張モジュール有効化手順

1.アプリのルート直下に「.bp-config」というフォルダを作成
2.「.bp-config」フォルダ内に「options.json」というファイルを追加
3.「options.json」の内容を以下のように記載

{
    "PHP_EXTENSIONS": [ "mysql", "mbstring", ...(有効にしたい拡張モジュール名を追加)]
}

4.アプリのルート直下に「composer.json」というファイルを追加
5.「composer.json」の内容を以下のように記載(中括弧のみ)
{}

これで、アプリをデプロイすれば、PHP拡張モジュールが有効になります。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2