Is there a PHP buildpack out there which I can use which has the DB2 extensions and the SSL for the DB2. I have been searching for it and tried using the PHP Buildpack, but with no luck to connect to the DB2.
Any suggestion is appreciated.
Thanks
I haven't tested that but you should be able to use the standard PHP builpack that comes with IBM Cloud and its Cloud Foundry.
The PHP buildpack allows to configure extensions to be downloaded. If you add ibm_db2.so as extension, it should be considered as it is part of the regular PHP ecosystem. Another Db2 driver is PDO_IBM.
Related
During the IBM Cloud Foundy upgrade to cflinuxfs3 a few things got missed, including providing a way to connect IBM Cloud php app to IBM Cloud DB2.
The provided buildpacks do not support DB2 connections and the instructions on IBM Knowledge Center are no longer valid.
Anyone knows how to connect IBM Cloud php app to IBM Cloud DB2 after the Sept 16th upgrade?
If your cloud solution does not supply a working extension for Db2 to work with your PHP in your chosen environment, that is not a matter for StackOverflow.
Instead, Use the github issues page(s) to work with your buildpack supplier and cloud vendor to build the required extension with the required toolchain, or pay someone to do the build and test and deploy to your instances.
If you use an IBM Db2 driver and and IBM written Db2 extension for PHP, then it is a CLI / ODBC application, and because of that, the configuration for SSL needs to follow the IBM-documented steps - all of which have the pre-requisite that you have a working PHP extension for Db2 that works in your environment, along with other pre-reqs.
I have installed the entire lamp stack with homebrew on my macbook pro. I am in need of getting the sybase module installed but am having the worst time trying to figure it out. I have done upteen google searches and read over the php.net section on sybase:
http://php.net/manual/en/sybase.installation.php
I have no clue when it says:
To enable Sybase-CT support configure PHP --with-sybase-ct[=DIR]
I was hoping to reach out to someone who has enabled/installed this on a mac or unix environment. Hope you can let me know the steps I need to run to get this up and running so I can use:
sybase_connect();
Thanks in advance.
You can also use FreeTDS to connect to Sybase from your Mac's PHP. Will be much easier than trying to configure the Sybase-CT library.
That section is asking for where on your system the Sybase installation is. To connect to a Sybase DB, you need to have either the client piece, SDK, or server piece installed on the local system.
The Sybase home directory includes the connection libraries that PHP is looking for.
I want to connect php from XAMPP to Cassandra.
I have installed cassandra and xampp.
After searching over the internet, I got to know that thrift interface and any one php cassandra client is required for the connection.
For php cassandra client I am using phpcassa.
There is thrift-server.exe in the lib folder of cassandra. Is it working as a thrift interface What is the purpose of it?
Thanks
My suggestion is to use the DataStax PHP driver 1 and use CQL instead of Thrift.
Is there a thin driver for Oracle available to be used with PHP (for example as an extension)?
I cannot install the OCI driver/client, but need to be able to access an Oracle database.
What is the problem with installing the OCI driver ?
The InstantClient version simply requires an unzip and setting a couple of environment variables.
The other option is exposing the database functionality through web services. 11g includes an inbuilt HTTP server.
Oracle released a jdbc driver written only in java, but (afaik) without the source code, so I doubt they will release a php (source code) driver. And never heard of an attempt by someone else.
But another question: "(for example as an extension)" You would be able to install an extension but not the oci8 extension?
There is no "thin" Oracle driver in PHP. You always need an external client library such as Oracle Instant Client - which is really easy to install.
Check http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf
(Also, Oracle has RPMs of PHP and Instant Client that can be used on RH Linux.)
How do I connect to a remote Oracle database instance from PHP?
I need to query (read only) the remote Oracle database for some information; do I need to have an Oracle Instant Client installed?
Is the OCI extension for PHP enough?
From PHP Manual
You will need the Oracle client libraries to use this extension.
The most convenient way to install all the required files is to use Oracle Instant Client, which is available from Oracle's site
The best manual for using PHP with Oracle is Underground PHP Oracle Manual. Periodically updated. For example last update describe new cool OCI (Oracle Call Interface) features. I found it by accident and since then has never regretted. Start from that good manual.
there are a couple of steps you need to go through to make this work.
First, you need to install the oracle driver for whatever OS you have. Then, create a DSN for odbc to use to connect the php function call to the oracle database. On windows, you can find this on the Control Panel -> ODBC Sources
Once you have done this, restart the DB, the web server and then you should be able to test it all with this:
odbc_connect($dsn,$user,$pass);
If you have linux, the same steps are needed but I'm not sure how you create a DSN in unix.
I saw this in the "Notes" section of the PHP documentation:
If you're using PHP with Oracle Instant Client, you can use easy connect naming method (...)
So I think it's rather clear that you can connect to an Oracle DB without the Oracle Instant Client, using only the PHP Oracle extension.
If you're attempting to connect to oracle on ubuntu with PHP, the following links have been more than helpful:
A) http://pecl.php.net/bugs/bug.php?id=9253
That's the real-workhorse one - it gives you just about all the data you need.
B) http://fabrizioballiano.net/2008/01/26/how-to-install-php-pdo_oci-on-ubuntu-gutsy/
This is also helpful for details of things that need to be installed for oracle to work with ubuntu.
If you're using it with PHP, you'll need to make sure that the TNS_ADMIN and ORACLE_HOME environment variables are available for apache's user - there's a file named 'envvars' in the apache2 directory where you can set these. (For my own ease of use, I have the two point to the same directory.)