Jump to content
The Uniform Server Community

Can not run PDO on Uniformserver 5.5a


changtraingheo
 Share

Recommended Posts

I edit php.ini file:

 

extension=php_openssl.dll

extension=php_pdo.dll

extension=php_pdo_firebird.dll

extension=php_pdo_mssql.dll

extension=php_pdo_mysql.dll

extension=php_pdo_oci.dll

extension=php_pdo_oci8.dll

extension=php_pdo_odbc.dll

extension=php_pdo_pgsql.dll

extension=php_pdo_sqlite.dll

 

And then copy that files into folder UniServer\usr\local\php\extensions , restart Apache, but can not run PDO script because "could not find driver"... and this code

 

<?php

try {

$dbh = new PDO('mysql:host=localhost;dbname=blog', 'root', 'root');

foreach ($dbh->query('SELECT * from sad_cat') as $row) {

print_r($row);

}

$dbh = null;

} catch (PDOException $e) {

print "Error!: " . $e->getMessage() . "<br/>";

die();

}

?>

Link to comment
Share on other sites

Hello,

You mentioned you copied those files into PHP's extension directory. From where did these files come from? If they were from a PHP source download from www.php.net, did you download the same PHP version you have?

 

Kalpz

ATOMIC Web Hosting 2007 - 2011

Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail)

E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I was installing a Magento with Uniserver 5.5 and got this warning about need to load pdo_mysql

Saw you post here...

 

Found the PHP.INI file...

 

Edit in notepad to load php_pdo_mysql

saved and restarted the Uniserver.... Bingo :-)

 

(Next step in Magento was more tricky... but I found that the port that uniserver default is installed to is localhost:80 <<< Port 80)

 

(I can not have Outlook or Skype running while using Uniserver ... they properly uses the same port !??)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...