0

Is it possible to connect from w3ibm.bluemix/PHP Cloud Foundry app to a bluezone zOS system and it's DB2 table?

I already connecting to a DB2 table on w3ibm.bluemix (using a db2 service and having a table there). It worked, but now I would like to connect to a zOS system.

When I try to connect locally I receive this error message:

An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968 SQLCODE=-1598

I have a lincense file but its in jar format (db2jcc_license_cisuz.jar) and I have no idea how to add a jar to a php project..

When I try to connect from w3ibm.bluemix (Cloud) - I receive this error - using the same code:

The remote host "******.UK.IBM.COM" was not found. SQLSTATE=08001 SQLCODE=-1336

Thx in advance!

Andr
  • 88
  • 1
  • 10

2 Answers2

1

You need to find a Db2-connect gateway server (or secure gateway) that is located in a zone reachable from bluemmix with the relevant ports opened. There may be approvals required for such access, specific credentials, encryption/key-exchange requirements etc.

I suggest you engage the people who look after the target Db2-system, or the service owner(s) for the application(s) that manage the target data.

mao
  • 11,321
  • 2
  • 13
  • 29
0

For connecting from IBM Bluemix to a blue zone zOS DB2 with a PHP Cloud Foundry app,

  1. Deticated Secure Gateway,
  2. PHP buildpack with DB2 extension and
  3. zOS DB2 license file copied to the right place

are needed.

For point 2, PHP buildpack, you just have to update your manifest.yml, adding or updating build-pack value to:

buildpack: https://github.com/ibmdb/php-buildpack

Then you have to set the version of PHP used to one that has DB2 extension pre-setted, so it's installed during build. For that you need a composer.json file in your project root folder - example with this value:

{
    "require": {
        "php": "7.0.16"
    }
}
Andr
  • 88
  • 1
  • 10