Hello,
I apologize if this is a duplicate as I did create an issue on this already yesterday, however I cannot find it when I search, so I think I may not have completely created it.

We have Drupal running on Windows Server 2008 R2 and I am trying to query a MS SQL database using Forena. I continue to get the "PDO driver support for xxxx not installed" where I've tried every combination of the following for xxxx: odbc, mssql, sqlsrv, pdo_xxxx, xxxx_pdo. When I try mysql, I do not get this error, instead I get "Unable to connect to database" which leads me to believe I can connect to a MYSQL database.

I have done quite a few different things including setting up ODBC connections to the MS SQL database (SQL Server and SQL Server Native), following the instructions at http://robsphp.blogspot.com/2012/09/how-to-install-microsofts-sql-server... posted by janeks at this issue. When I run PHP -i from the command prompt, I get the following information about PDO, which leads me to believe that ODBC is enabled, so I would expect that as janeks I should be able to use ODBC.

odbc

ODBC Support => enabled
Active Persistent Links => 0
Active Links => 0
ODBC library => Win32

Directive => Local Value => Master Value
odbc.allow_persistent => On => On
odbc.check_persistent => On => On
odbc.default_cursortype => Static cursor => Static cursor
odbc.default_db => no value => no value
odbc.default_pw => no value => no value
odbc.default_user => no value => no value
odbc.defaultbinmode => return as is => return as is
odbc.defaultlrl => return up to 4096 bytes => return up to 4096 bytes
odbc.max_links => Unlimited => Unlimited
odbc.max_persistent => Unlimited => Unlimited

PDO

PDO support => enabled
PDO drivers => mysql, odbc, sqlite, sqlsrv

pdo_mysql

PDO Driver for MySQL => enabled
Client API version => mysqlnd 5.0.11-dev - 20120503 - $Id: xxxxxxxxx
xxxxxxxxxxx

PDO_ODBC

PDO Driver for ODBC (Win32) => enabled
ODBC Connection Pooling => Enabled, strict matching

pdo_sqlite

PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.8.4.3

pdo_sqlsrv

pdo_sqlsrv support => enabled
Version => 3.0.2.2R (Unofficial)
Unofficial Changes => Works with Native Clients 11/10/9

Directive => Local Value => Master Value
pdo_sqlsrv.client_buffer_max_kb_size => 10240 => 10240
pdo_sqlsrv.log_severity => 0 => 0

I also know that we can currently connect to this database because we have a manual report with PHP code that does query the database and returns data using the ODBC_Connect function, which leads me to believe the drivers seem to be ok. I am really stumped as everything I search for brings me back to this issue and unfortunately I've tried everything here. I'd really appreciate some help so that we can use Forena and do not have to write tons of code for our reports!

Comments

mb629 created an issue.

metzlerd’s picture

It is quite common for php command line to be using different php.ini settings then php run from the web browser. The best way to inspect the PHP configuration that forena will use is to navigate to your reports->status report menu and find the place where it lists your php version and click on the "more information" link. This will let you know what PHP configuration drupal is using, including the location of the php.ini file being used.

If you are using forena's PDO drivers to connect to mssql, read the options for creating DSN strings at http://php.net/manual/en/pdo.construct.php for additional information on database connection strings.