1

So this morning I used aptitude to install a few security updates. Seemed innocent enough until stuff stopped working. Somewhere along the way, a few packages got dropped, I guess. Now PHP (specifically PHP5-FPM) doesn't think it's connected to MySQL and I have no idea why. All packages seem to be installed. According to phpinfo():

  • The php.ini file from /etc/php5/fpm.
  • An additional /etc/php5/fpm/conf.d/mysql.ini file is being parsed (among others)
  • The mysql.ini file includes this line:

    extension=mysql.so
    

Installed PHP-related packages:

$ dpkg --get-selections | grep php  
libapache2-mod-php5       install
php-pear          install
php5            install
php5-cgi          install
php5-cli          install
php5-common         install
php5-curl         install
php5-dev          install
php5-fpm          install
php5-gd           install
php5-mcrypt         install
php5-memcache         install
php5-mysql          install

Installed MySQL packages:

$dpkg --get-selections | grep mysql
libdbd-mysql-perl       install
libmysqlclient-dev        install
libmysqlclient18        install
mysql-client-5.5        install
mysql-client-core-5.5       install
mysql-common          install
mysql-server          install
mysql-server-5.5        install
mysql-server-core-5.5       install
php5-mysql          install

Services status:

$ sudo service --status-all
 [ + ]  memcached
 [ ? ]  mysql
 [ ? ]  network-interface
 [ ? ]  network-interface-container
 [ ? ]  network-interface-security
 [ ? ]  networking
 [ + ]  nginx
 [ + ]  php5-fpm
 [ + ]  ssh

As you might expect from the services output, this is a nginx+php5-fpm+mysql install. Although status-all shows unknown, the mysql service is running (confirmed w/ ps).

Granted, I'm no sysadmin (!), but I've exhausted everything I can find or think of that would prevent the MySQL extension from being loaded. If anyone can offer any guidance I'd very much appreciate it. No doubt I'm missing something fundamental, but I'm at a loss right now for what it might be.

Thanks.

UPDATE

For whatever it might be worth, when looking at the phpinfo output, I also don't see groups for curl or gd, but do see groups for mcrypt and memcache. I'm not sure what to make of that. If I try to install php5-mysql, apt just tells me it's already installed.

6
  • What version of php are you using. php5.3 and newer has MySQL-ND built in. Sep 18, 2012 at 18:19
  • @sonassi: PHP 5.3.10. I'm not sure what the MySQL-ND package is or how it impacts what I'm trying to do. This worked yesterday with PHP 5.3 and whatever config I hadn't yet blown up. Sep 18, 2012 at 18:21
  • Have you tried restarting php5-fpm? Sep 18, 2012 at 18:26
  • @MichaelHampton - Definitely. Sep 18, 2012 at 19:01
  • @MichaelHampton - Whoa. I have done it several times (confirmed in history), but apparently I've done something in the meantime and the combination of things was magical. Thanks for prompting me to do it again. Sep 18, 2012 at 19:05

1 Answer 1

0

Have you tried restarting php5-fpm? apt should restart it during the upgrade, but sometimes it gets the timing wrong.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .