[support] Database Drivers unreachable (dependecy hell)

Jamie Holly hovercrafter at earthlink.net
Sat Jun 1 16:20:24 UTC 2013


Drivers are loaded in the php.ini file. Depending on how PHP is 
installed, chances are you have a couple of php.ini files. One is for 
the webserver and the other is for CLI.

You can find the location of the php.ini file the CLI is using by 
running this command:

   php -i | grep Loaded

To check if that configuration file has PDO support in it:

   php -i | grep PDO

You should get back something like this:

   PDO
   PDO support => enabled
   PDO drivers => mysql, odbc, sqlite
   PDO Driver for MySQL => enabled
   PDO_ODBC
   PDO Driver for ODBC (unixODBC) => enabled
   PDO Driver for SQLite 3.x => enabled

If not, then you need to enable the extensions in php.ini.


Jamie Holly
http://www.intoxination.net
http://www.hollyit.net

On 6/1/2013 11:29 AM, Tim Johnson wrote:
> * Jamie Holly <hovercrafter at earthlink.net> [130601 07:11]:
> > Plop <?php phpinfo(); ?> into a file and load that in your browser to
> > make sure PDO is actually loading. You should also have the base pdo
> > driver there (pdo.so) and that along with whatever databases you want to
> > use need to be loaded through php.ini as such:
> >
> > extension=pdo.so
> > extension=pdo_mysql.so
>   Thanks Jamie : I have already done phpinfo - and I have PDO loading.
>
>   I'm just getting to it but I believe that for drush in cli mode, I
>   need a alias or a switch for 'drush updb' to tell it what driver to
>   use.
>
>   Will report back.
>   cheers
> > Jamie Holly
> > http://www.intoxination.net
> > http://www.hollyit.net
> >
> > On 5/31/2013 7:31 PM, Tim Johnson wrote:
> > > I've got drupal 7 and drush on Mac OSX 10.7
> > > The original PHP install (as shipped) is 5.3.25.
> > >
> > > with that configuration I was able to upgrade drupal sites running
> > > locally for several occassions.
> > >
> > > One site used sqlite, the other mysql.
> > >
> > > Now I have installed PHP 5.4.15, as well as the mysql and sqlite
> > > drivers for php54.
> > >
> > > Now when I run drush updb, I get the following:
> > >
> > > A PDO database driver is required! You need to enable the PDO_SQLITE
> > > (or PDO_MYSQL) database driver for PHP 5.2.4 or higher so that
> > > Drupal 7 can access the database.
> > >
> > > I find
> > > Applications/MySQLWorkbench.app/Contents/Resources/libraries/pysqlite2/_sqlite.so
> > > /opt/local/lib/php54/extensions/no-debug-non-zts-20100525/pdo_sqlite.so
> > > and
> > > opt/local/lib/php54/extensions/no-debug-non-zts-20100525/mysql.so
> > > /opt/local/lib/php54/extensions/no-debug-non-zts-20100525/pdo_mysql.so
> > >
> > > Worse, if I set the php execute as php54, drush freezes on the
> > > drush updb
> > > command. No error messages, just stalls.
> > >
> > > This is a mess. I feel that I am back in linux 6 dependency hell!
> > >
> > > BTW: Those of you who might be using homebrew and would recommend
> > > that I convert, would be on the right track but unfortunately I have
> > > over 200 _active_ packages installed via macports.
> > >
> > > Where do I start?
> > >
> > > thanks
> >
> > --
> > [ Drupal support list | http://lists.drupal.org/ ]
>



More information about the support mailing list