cancel
Showing results for 
Search instead for 
Did you mean: 

php oci8 connect to EDB postgres

Silver Adventurer

php oci8 connect to EDB postgres

Hi all.

Can i use oci8 to connect from PHP to EDB Postgres, through ocilib the documentation link https://www.enterprisedb.com/docs/en/10.0/oci/toc.html

 

 

for example  i need use the same connection from PHP, OCI8 to connect to EDB Postgres

like this image:

 

https://www.enterprisedb.com/docs/en/10.0/oci/EDB_Postgres_Advanced_Server_OCI_Connector_Guide.1.05....

 

is posible?

 

 

regards

3 REPLIES
EDB Team Member

Re: php oci8 connect to EDB postgres

Hi  asotolongo,

 

We are looking into the reported request.

We will update you soon with the progress.

 

Kindly let us know in case of any concerns or issues.

Highlighted
EDB Team Member

Re: php oci8 connect to EDB postgres

Hello asotolongo,

 

Yes, We use oci8 to connect from PHP to EDB Postgres.

Below are the Steps for connecting PHP application to EPAS using OCI connector :

  1. yum install php php-devel php-pear php-pgsql
  2. install edb connectors: ./edb-connectors-9.6.0.3-2-linux-x64.run
  3. install Oracle instant client 11.2 + SDK
  4. pecl install oci8-2.0.12
  5. in /etc/php.ini add(if necessary) extension=oci8.so and extension=pgsql.so
  6. ldd /usr/lib64/php/modules/oci8.so will list all libraries
  7. change libraries above to edb libraries in /opt/edb/connectors
  8. run simple php script to connect to EPAS database:
  9. cat e.php
    <?php
    error_reporting(E_ALL|E_STRICT);
    ini_set('display_errors', 'On');
    oci_internal_debug(1);
    $conn = oci_connect('enterprisedb', 'password', '//epas96:5444/edb') ;
    var_dump($conn);
    oci_close($conn);
    ?>
  10. php e.php


Also, Please find the attached readme file for the more insight.

Hope this helps!

Silver Adventurer

Re: php oci8 connect to EDB postgres

hi @dhananjayjejur, thanks

we wil check your notes and tell you the feedback

 

Regards