XAMPP and ORACLE

Problems with the Windows version of XAMPP, questions, comments, and anything related.

XAMPP and ORACLE

Postby pichan81 » 02. April 2011 16:49

Hi all,
I want to build an application on windows using xampp (1.7.4), oracle (XE 10.2) over yii framework (1.1.6).
I receive the following error "CDbConnection failed to open the DB connection: could not find driver " when I attempt to access db.

In the main.php I add

Code: Select all
               'db'=>array
      (
         'class'=>'CDbConnection',
         'connectionString'=>'oci:dbname=//127.0.0.1:1521/xe',
         //'charset'=>'UTF8'
         'username'=>'blog',
         'password'=>'blog',

      ),

To activate oci i made the following step:
- copied xampp dir in C:\xampp
- copied oracle instant client in C:\xampp\instantclient_11_2
- decomment the line "extension=php_oci8.dll" from php.ini

Did I miss something to do?

When I run xampp control panel application and go to phpinfo menu the value for Configure Command is the following

Code: Select all
cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--disable-isapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static"

but I have no D:\ path in my pc

PS: I'm sure the db is on because I can use it by Toad

help me please !!!!!!
pichan81
 
Posts: 1
Joined: 02. April 2011 16:34

Re: XAMPP and ORACLE

Postby Sharley » 03. April 2011 03:56

Look in the phpinfo() for which php.ini file is being used:
http://localhost/xampp/phpinfo.php
Loaded Configuration File
Should be the php.ini file in C:\xampp\php folder.

BTW this section is from my php.ini file and looks similar to yours even though XAMPP is installed in a folder on my G:\ drive. So it can be ignored for now perhaps.
Code: Select all
Configure Command    cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--disable-isapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=D:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet" "--with-mcrypt=static"


So make sure that no other php instances are running and using another php.ini file as PHP in XAMPP will conflict if it is not using it's own php.ini file - with often unexplainable issues being produced.

Just to add, also make sure that you have the correct extension in the \xampp\php\ext folder that you uncommented in the php.ini file.
This guide is relatively old but may contain some helpful reading:
A Guide to using PHP 5 Extensions on Windows

These 2 Google searches may help and perhaps worth bookmarking for future reference:
http://www.google.com/search?q=php_oci8.dll
http://www.google.com/search?q=php_pdo_oci8.dll
Both extensions are included in the php.ini file and the ext folder.


As a final comment and if all else fails try installing version 1.7.3 which was the last known stable version - or wait for 1.7.5 which is still in beta and may and I stress may solve some of these mysterious issues with this, IMHO, hurriedly released version 1.7.4.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 62 guests