Connecting to MySQL

Connecting to MySQL

am 14.01.2011 20:15:01 von Cristiano Di Buduo

I just downloaded both PHP and MySQL=2C both newest stable versions=2C both=
are working well=2C but when i try{} to :
=20
$dbh =3D new PDO('mysql:host=3Dlocalhost=3Bdbname=3Dtest'=2C "user"=2C=
"passwd")=3B
=20
i catch{} a "could not find driver" error.
=20
Any help with this?
=20
I think the proper modules were set up in the php.ini by default. =
=

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Connecting to MySQL

am 14.01.2011 21:52:55 von Phpster

On Fri, Jan 14, 2011 at 2:15 PM, Cristiano Di Buduo
wrote:
>
> I just downloaded both PHP and MySQL, both newest stable versions, both a=
re working well, but when i try{} to :
>
> =A0 =A0 $dbh =3D new PDO('mysql:host=3Dlocalhost;dbname=3Dtest', "user", =
"passwd");
>
> i catch{} a "could not find driver" error.
>
> Any help with this?
>
> I think the proper modules were set up in the php.ini by default.
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Check the php.ini or run to see if the PDO is enabled

--=20

Bastien

Cat, the other other white meat

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Connecting to MySQL

am 15.01.2011 15:25:14 von Cristiano Di Buduo

Resolved itself=2C just had to reboot. Works fine now.
Thanks anyway :)

----------------------------------------
> From: cristiano_di_buduo@hotmail.com
> To: phpster@gmail.com
> Subject: RE: [PHP-DB] Connecting to MySQL
> Date: Fri=2C 14 Jan 2011 21:58:33 +0100
>
>
> It outputs:
>
> PDO
> PDO support enabled
> PDO drivers mysql=2C odbc=2C sqlite
>
>
> ----------------------------------------
> > From: phpster@gmail.com
> > Date: Fri=2C 14 Jan 2011 15:52:55 -0500
> > To: cristiano_di_buduo@hotmail.com
> > CC: php-db@lists.php.net
> > Subject: Re: [PHP-DB] Connecting to MySQL
> >
> > On Fri=2C Jan 14=2C 2011 at 2:15 PM=2C Cristiano Di Buduo
> > wrote:
> > >
> > > I just downloaded both PHP and MySQL=2C both newest stable versions=
=2C both are working well=2C but when i try{} to :
> > >
> > > $dbh =3D new PDO('mysql:host=3Dlocalhost=3Bdbname=3Dtest'=2C "user"=
=2C "passwd")=3B
> > >
> > > i catch{} a "could not find driver" error.
> > >
> > > Any help with this?
> > >
> > > I think the proper modules were set up in the php.ini by default.
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe=2C visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > Check the php.ini or run to see if the PDO is enabled
> >
> > --
> >
> > Bastien
> >
> > Cat=2C the other other white meat
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe=2C visit: http://www.php.net/unsub.php
> > =

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Connecting to MySQL

am 15.01.2011 18:10:41 von kranthi

note that you'll have to restart apache after any changes to httpd.conf/php.ini

in your case httpd.conf was changed when u installed PDO

Kranthi.
http://goo.gl/e6t3

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php