I have a bare bones NT Server running IIS 4, with PHP 4.0.2 installed as the default binary. I am trying to make a connection to an Oracle 8.0.5 Server which is on the network and I am at a loss. I have tried

$odbcconn = odbc_connect("SID", "ID", "PASS");

and I have also tried

$conn = OCIpLogon("ID/PASS@SID","");

But none work. The ODBC version returns
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\InetPub\wwwroot\testing\Faxing\connect.php on line 20

And the OCIpLogin returns

call to undefined function. I have placed php_oci8.dll and php_oracle.dll in my cgi-bin directory.

Any help would REALLY be appreciated since I am doing this for work as a "demo" of what can be done with PHP. I am comfortable with PHP on Apache/Linux/MySql but have not had any experience with NT/IIS/Oracle and PHP. I want to make a good impression but I need to connect to an Oracle DB first.

Thanks

    Johnny,

    In order for PHP to make an ODBC connectin to any datasource, you have to specify an ODBC driver and DSN in Windows.

    Go to the Control Panel and open up ODBC and configure a connection to Oracle.

    Also, php_oci8.dll normally goes in the PHP install base (normally c:\php) Then in the php.ini, specify extension_path = c:\php
    and add a line extension=php_oci8.dll to the Extensions area.

    That should do it! If you have any other questions, let me know!

    Brett

      Thanks for your tips. I do have a working set of ODBC DSN's on the machine and I have put the php_odbc.dll files into c:\php and made sure the path was added to php.ini. However, when I try to load the basic <?phpinfo()?> page, I get a message saying "Unable to load dynamic library 'c:\Php\php_odbc.dll'. The specified module could not be found". I checked and it looks like I dont even have that module so that message is expected. However, I do have the php_oci8.dll module and the message I get is "Unable to load dynamic library c:\Php\php_oci8.dll' - The specified procedure could not be found".?

      Do you know where I would find the php_odbc.dll and/or why I am getting that second message with the php_oci8.dll?

      Thanks

        9 days later

        I have an Oracle8i with NT4. Now I want to make a web server with PHP in another Linux machine. How to install PHP to enable Oracle connection?

          Write a Reply...