RE: could not find driver

783 views
Skip to first unread message

STARNES, CURTIS

unread,
Aug 10, 2012, 8:42:10 AM8/10/12
to simple...@googlegroups.com

You need the MySQL ODBC driver installed on your windows server.

http://dev.mysql.com/downloads/connector/odbc/

 

Curtis

 

From: simple...@googlegroups.com [mailto:simple...@googlegroups.com] On Behalf Of harol...@teqservices.com
Sent: Wednesday, August 08, 2012 4:31 PM
To: simple...@googlegroups.com
Subject: could not find driver

 

Hello,

 

I am new to simpleSAMLphp. I installed it; everything looks good (all necessary php modules are added). However, when I test my authentication source, which is a mySQL table, I get "could not find driver", so this comes before it even tries to login. The php extensions are present and loaded (myssql, mysqli, PDO, pdo_mysql). Does anyone have any idea why this is happening? [This is currently on a windows server, but I will also have to get it to work on a hosted linux server.]

 

Harold

--
You received this message because you are subscribed to the Google Groups "simpleSAMLphp" group.
To view this discussion on the web visit https://groups.google.com/d/msg/simplesamlphp/-/t_ck5bRvf_cJ.
To post to this group, send email to simple...@googlegroups.com.
To unsubscribe from this group, send email to simplesamlph...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simplesamlphp?hl=en.

Harold

unread,
Aug 10, 2012, 11:21:30 AM8/10/12
to simpleSAMLphp
Thanks Curtis,

One thing I forgot to mention is that my PHP scripts are normally able
to connect to the MySQL database and so I assumed there was a driver
present. Is this particular driver a special requirement for
simpleSAMLphp?

On Aug 10, 6:42 am, "STARNES, CURTIS" <Curtis.Star...@granburyisd.org>
wrote:
> You need the MySQL ODBC driver installed on your windows server.http://dev.mysql.com/downloads/connector/odbc/
>
> Curtis
>
> From: simple...@googlegroups.com [mailto:simple...@googlegroups.com] On Behalf Of harolden...@teqservices.com
> Sent: Wednesday, August 08, 2012 4:31 PM
> To: simple...@googlegroups.com
> Subject: could not find driver
>
> Hello,
>
> I am new to simpleSAMLphp. I installed it; everything looks good (all necessary php modules are added). However, when I test my authentication source, which is a mySQL table, I get "could not find driver", so this comes before it even tries to login. The php extensions are present and loaded (myssql, mysqli, PDO, pdo_mysql). Does anyone have any idea why this is happening? [This is currently on a windows server, but I will also have to get it to work on a hosted linux server.]
>
> Harold
> --
> You received this message because you are subscribed to the Google Groups "simpleSAMLphp" group.
> To view this discussion on the web visithttps://groups.google.com/d/msg/simplesamlphp/-/t_ck5bRvf_cJ.
> To post to this group, send email to simple...@googlegroups.com<mailto:simple...@googlegroups.com>.
> To unsubscribe from this group, send email to simplesamlph...@googlegroups.com<mailto:simplesamlphp+unsubscribe­@googlegroups.com>.

STARNES, CURTIS

unread,
Aug 10, 2012, 12:06:08 PM8/10/12
to simple...@googlegroups.com
Normally PHP connects to MySQL via PHP::MySQL API calls.
Which on Linux, when you install PHP::MySQL with your Apache, PHP, MySQL installation.
Since this is on a windows box, I would make the assumption that the MySQL driver package needs to be installed since it is complaining about missing a driver.

BTW, I found it a lot easier to install on a Ubuntu box than a windows box.

Curtis
To post to this group, send email to simple...@googlegroups.com.
To unsubscribe from this group, send email to simplesamlph...@googlegroups.com.

Harold

unread,
Aug 13, 2012, 3:48:18 PM8/13/12
to simple...@googlegroups.com
Thanks Curtis,
 
I installed the ODBC driver. After installing I checked on the windows list of drivers and it showed up (which is a good sign).
 
I tried the connect test again, but nothing changed....still cannot find driver. It is strange. Maybe simpleSAML.php does not work with mysql on windows.
 
Harold

Dick Visser

unread,
Aug 15, 2012, 10:07:52 AM8/15/12
to simple...@googlegroups.com
What does your auth source entry look like?
Can you post it here (minus credentials)?
> https://groups.google.com/d/msg/simplesamlphp/-/QNMhRVWNWrkJ.
>
> To post to this group, send email to simple...@googlegroups.com.
> To unsubscribe from this group, send email to
> simplesamlph...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/simplesamlphp?hl=en.



--
Dick Visser
System & Networking Engineer
TERENA Secretariat
Singel 468 D, 1017 AW Amsterdam
The Netherlands

Harold

unread,
Aug 16, 2012, 12:26:05 PM8/16/12
to simple...@googlegroups.com
Hi Dick,
 
Here it is:
 
      'example-sql' => array(
      'sqlauth:SQL',
      'dsn' => 'mysql:host=dev1.teq-ss-services.com;port=3406;dbname=nbscabor_db',
      'username' => '....',
      'password' => '....',
      'query' => "select USERNAME, FNAME||' '||LNAME, EMAIL from NBSCAB_USERS where USERNAME = :username and PASSWORD = :password",
   ),
I thought that simpleSAML might need to know where the driver was, but I could not find anything in the configuration files relevant.
 
Harold

Dick Visser

unread,
Aug 17, 2012, 6:05:39 AM8/17/12
to simple...@googlegroups.com
Harold

> Here it is:
>
> 'example-sql' => array(
> 'sqlauth:SQL',
> 'dsn' =>
> 'mysql:host=dev1.teq-ss-services.com;port=3406;dbname=nbscabor_db',
> 'username' => '....',
> 'password' => '....',
> 'query' => "select USERNAME, FNAME||' '||LNAME, EMAIL from
> NBSCAB_USERS where USERNAME = :username and PASSWORD = :password",
> ),
> I thought that simpleSAML might need to know where the driver was, but I
> could not find anything in the configuration files relevant.

The way it is supposed to work is that database drivers (a.k.a.
modules) are loaded by defining them in php.ini.
PHP scripts (which SSP is) can then use them.
While it is possible to load modules from scripts (using the dl()
call), this is not common practice.

Since sqlauth:SQL uses PDO as database abstraction layer, you need
that to begin with ('PDO').
Then you'd need the mysql driver for PDO ('pdo_mysql').
Note that the old 'mysql' driver is different and not needed for PDO -
although it does not interfere either if it is there.

You say that "the php extensions are present and loaded (myssql,
mysqli, PDO, pdo_mysql)".
How did you establish that? (I think 'myssql' is a typo?)

I wonder if it is different from the SSP info page.
Could you look and see how things are there?
Check <yoursite>/admin/phpinfo.php

Harold

unread,
Aug 17, 2012, 12:37:07 PM8/17/12
to simpleSAMLphp
Thanks Dick,

I reviewed the phpinfo() again carefully and discovered that instead
of pdo_mysyql, I had mistakenly uncommented the extension pdo_sqlite.

Sorry guys.

So anyway...it now works fine.
Reply all
Reply to author
Forward
0 new messages