error on mssql

20 views
Skip to first unread message

alex araujo

unread,
Dec 16, 2010, 4:03:09 PM12/16/10
to Outlet ORM
First sorry for my English and I'm new with outlet ORM.
I have success when connect sql base with php.
But when I try to use Outlet ORM. I have this error


<br />
<b>Fatal error</b>: Uncaught exception 'PDOException' with message
'could not find driver' in /mnt/sdb2/www/libs/outlet/classes/outlet/
OutletConfig.php:53
Stack trace:
#0 /mnt/sdb2/www/libs/outlet/classes/outlet/OutletConfig.php(53): PDO-
&gt;__construct('mssql:host=RM-U...', 'rm', 'rm')
#1 /mnt/sdb2/www/libs/outlet/classes/outlet/Outlet.php(54):
OutletConfig-&gt;__construct(Array)
#2 /mnt/sdb2/www/libs/outlet/classes/outlet/Outlet.php(35): Outlet-
&gt;__construct(Array)
#3 /mnt/sdb2/www/importador/control/OLconfig.php(3):
Outlet::init(Array)
#4 /mnt/sdb2/www/importador/view/testeMSSQL.php(48): require('/mnt/
sdb2/www/i...')
#5 {main}
thrown in <b>/mnt/sdb2/www/libs/outlet/classes/outlet/
OutletConfig.php</b> on line <b>53</b><br />


please help me

Alvaro Carrasco

unread,
Dec 16, 2010, 5:25:44 PM12/16/10
to outle...@googlegroups.com
Hi Alex,

On Thu, Dec 16, 2010 at 2:03 PM, alex araujo <alex....@gmail.com> wrote:
> First sorry for my English and I'm new with outlet ORM.
> I have success when connect sql base with php.

How are you connecting to SQL server using plain PHP? Are you using
PDO? Can you post the code?

> But when I try to use Outlet ORM. I have this error

> ...
>

Alvaro
--
http://www.alvarocarrasco.com
Scala-to-Javascript: https://github.com/alvaroc1/s2js

Holtkamp

unread,
Dec 19, 2010, 3:54:43 PM12/19/10
to Outlet ORM
The PDO library of your PHP installation seems to not support 'mssql'
as driver/dialect to connect to your database. You can use this code
snippet to find out what drivers/dialects are supported (using the
pdo_drivers() function:


$dsn = sprintf('%s:host=%s;dbname=%s;'
, $databaseDialect
, $databaseHost
, $databaseName);
try{
$pdo = new PDO($dsn
, $username
, $password);
}
catch(PDOException $e){
$message = array();
$message[] = 'Caught a PDOException: ' . $e->getMessage();
if(class_exists('PDO', true)){
$message[] = 'PDO class can be loaded and provides support for:';
foreach(pdo_drivers() as $driver){
$message[] = " - $driver";
}
die(implode(PHP_EOL, $message) . PHP_EOL);
Reply all
Reply to author
Forward
0 new messages