Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm try to install PHP 5.4 and I want to use PDO with the MySQL driver.

However, it seems the php54 package does not configure with the --with-pdo-mysql flag. How can I install this?

share|improve this question

migrated from May 22 '12 at 23:22

This question came from our site for professional and enthusiast programmers.

Hmm first off all use ./configure --help to see what options are supported for compiling php5.4.

You could paste here your configure options. I'm guesing that you didnt use option -enable-pdo thats why --with-pdo-mysql doesn't work. But it's only a guessing. Paste your configure options.

share|improve this answer

I had the same problem, pdo was enabled yet no drivers were installed after a lot of mucking about i discovered that its quite easy to sort, once you know how! if your php is installed as an apache module, this worked for me (on a mac)

sudo port install php54-mysql

which i guess in linux could be sudo apt-get install php54-mysql?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.