Shiroi98
Shiroi98

Reputation: 862

PHP connectivity to Oracle DB

I am currently trying to write a PHP script to connect to an Oracle database. The reason I am using PHP is because I need to connect the Oracle database with my current CRM system, written in PHP/MySQL.

The PHP is hosted on 1&1 hosting, which is an external server. I read that I need to enable the extension php_oci8.dll to connect using oci_connect(), but I cannot do so since I do not have root privileges. Did a search, and couldn't find the DLL either.

Is there any other way around this? Any help greatly appreciated, please let me know if you need more information. Thanks!

Upvotes: 2

Views: 833

Answers (3)

samatva
samatva

Reputation: 21

Please check that there are no blank spaces. 1. put the php.ini and the php_oci8.so in the same folder as where you are going to run the php program that is going to access the database. 2. php.ini contents should look like:

extesion=./php_oci8.so

Upvotes: 0

Vimal Panchal
Vimal Panchal

Reputation: 114

According to your problem. first thing is that linux doesn't support .dll file. You have to install OCI8 extension module in your Apache server. Follow this link to get easy solution.

http://coffeewithcode.com/2012/09/how-to-install-oracle-libraries-for-php5-on-ubuntu-server/

Upvotes: 0

LazyOne
LazyOne

Reputation: 165373

1) 1&1 will have Linux, so you will have to use linux names for extensions. In this case name of extension will be php_oci8.so

2) create the php.ini in root directory and put the following line extension=php_oci8.so

3) create a simple php script with one line to test if it works: <?php phpinfo(); ?>

Please note -- 1&1 may physically not have that file available on their server (or some additional libraries that may be required by that extension). If the problem just with absence of .so file, then you can provide your own version of it (upload it and put the correct full path to the extension in php.ini)

Useful links: 1) http://faq.1and1.com/scripting_languages_supported/php/6.html 2) http://faq.1and1.com/scripting_languages_supported/php/8.html

Upvotes: 1

Related Questions