tanveer Posted May 1, 2009 Share Posted May 1, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/ Share on other sites More sharing options...
revraz Posted May 1, 2009 Share Posted May 1, 2009 Did you do any searching at all? Tons of hits on Google for connecting to Oracle with PHP. Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/#findComment-823475 Share on other sites More sharing options...
premiso Posted May 1, 2009 Share Posted May 1, 2009 http://us3.php.net/oracle Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/#findComment-823476 Share on other sites More sharing options...
tanveer Posted May 1, 2009 Author Share Posted May 1, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/#findComment-823479 Share on other sites More sharing options...
premiso Posted May 1, 2009 Share Posted May 1, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/#findComment-823486 Share on other sites More sharing options...
tanveer Posted May 1, 2009 Author Share Posted May 1, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/#findComment-823507 Share on other sites More sharing options...
premiso Posted May 1, 2009 Share Posted May 1, 2009 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? ??? Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/#findComment-823552 Share on other sites More sharing options...
tanveer Posted May 1, 2009 Author Share Posted May 1, 2009 That my vendor who actually developed the application is wrong. Quote Link to comment https://forums.phpfreaks.com/topic/156411-connect-php-with-oracle-server/#findComment-823607 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.