Jump to content

Recommended Posts

Hi all,

 

We are using a intranet webserver which used to connect to a MSSQL server to fetch data from some views through an account and then insert it into the MySQL database.

The vendor uses freetds for connectivity with MSSQL.

Now the MSSQL server is shifting to Oracle and now how to connect to oracle database. Should I have to install oracle client in linux as I am using RHEL4 and recompile php with oracle home.

 

THanks in advance.

 

 

Link to comment
https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/
Share on other sites

Yes I did.

Ever link or procedure saying that it needs oracle instant client to connect with oracle database with php and need to recompile php with oracle home variable set.

 

But my vendor is saying nothings need to be done only the functions need to be changed from mssql_connect to oci_connet will do. Thats why I m confused.

Thanks.

But my vendor is saying nothings need to be done only the functions need to be changed from mssql_connect to oci_connet will do. Thats why I m confused.

Thanks.

 

Unfortunately we do not know your setup. We also do not know what you have tried to do in the past. Compiling PHP with the Oracle functions, should work with oracle database. I have never compiled PHP with that, but the manual should explain everything that you need to do get it working properly. We cannot see your server and do not have access to it. Nor would I want access.

 

When you say "vendor" you mean your host, if it were me I would ask for an in-depth explanation on how to set the variables or what they need. If you have changed the mssql_connect function to the oci_connect function and you have Oracle enabled on the server, then make sure your connection string is correct. See the function manual for proper usage.

 

If, however, Oracle is installed as a PHP extension correctly, the manual pages for the Oracle functions should help you figure out where you are going wrong. If you did in fact just rename mssql_connect to oci_connect without modifying the parameters, that may as well be the issue. But you will also have to redefine the database host and user/password if it has changed.

Nor I am in the position to provide your access. :)

 

Compiling PHP with the Oracle functions, should work with oracle database.

Compiling php with oracle support requires ORACLE_HOME variable set which requires oracle client to be installed  as you have to mention --with-oci8=whatever ORACLE_HOME variable is when compiling php.

As I know current php doesn't have OCI8 extension as per phpinfo page.

 

 

 

Compiling PHP with the Oracle functions, should work with oracle database.

Compiling php with oracle support requires ORACLE_HOME variable set which requires oracle client to be installed  as you have to mention --with-oci8=whatever ORACLE_HOME variable is when compiling php.

As I know current php doesn't have OCI8 extension as per phpinfo page.

 

Oci8 on PHP Requirements

 

You have to recompile PHP with Oracle, if it is not already compiled with it. No matter what your vendor says.

 

What is the question you are trying to get answered? ???

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.