4

I want to run php's built-in server (running by $ php -S localhost:8888) with PDO extension. But when I type this command into terminal it gives me:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/pdo_mysql.so' - /usr/lib/php5/20121212/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0

(And when I try to use it it says that PDO class not found)

The same is when I run just $ php. But when I start apache2 server everything looks good (the PDO extension is working).

And the file /usr/lib/php5/20121212/pdo_mysql.so exists.

Thanks for your answers!

(running php 5 on ubuntu)

1 Answer 1

15

I've finally solved by reinstalling php:

  1. Uninstall php with purge parameter:

    sudo apt-get --purge remove php5-common

  2. And install again:

    sudo apt-get install php5 php5-mysql php5-curl etc...

Source: Error In PHP5 ..Unable to load dynamic library

Sign up to request clarification or add additional context in comments.

1 Comment

This was a life saver for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.