Wednesday, November 5, 2014

Adding php extension on bluemix


To add extensions which are not default in bluemix,

Create a directory called .bp-config with following extension names

Example:-
.bp-config/options.json

{

   "WEB_SERVER": "httpd",
  "PHP_EXTENSIONS": ["pdo", "pdo_mysql", "mysql", "mysqli" , "mbstring"]

}

Administering mysql on bluemix

Administering mysql in bluemix
1. Using jazz devop services, login to
https://hub.jazz.net/

2. Clone the phpadmin
https://hub.jazz.net/project/rbelavad/phpmyadmin

3. Add the mbstring.so extension to php. Otherwise it gives error.

4. Bind the phpadmin to mysql instance

Configuring mysql with php application on bluemix


If your PHP application uses mysql service then you need to perform additional steps to use MySQL service

1)Create mysql instance using the below command

 cf create-service mysql 100 mysql-12345

2) bind the servicee instance to an application

 cf bind-service cbdb mysql-12345

Setup needed for deploying PHP application in bluemix


1)IBM ID:- Create IBM id if you do not have IBM id.

2)Sign up with bluemix using https://ace.ng.bluemix.net/

3) Create PHP Application in Yii framework:
 
After creating PHP application perform the following steps to deploy the application to bluemix.


4)Download and Install the cloud foundry tool :- From https://github.com/cloudfoundry/cli#installers download the Stable version of cloud foundry tool for the required OS and extract the zip contents. Install the tool with Administrative permission