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)
I've finally solved by reinstalling php:
Uninstall php with purge parameter:
sudo apt-get --purge remove php5-common
And install again:
sudo apt-get install php5 php5-mysql php5-curl
etc...
Source: Error In PHP5 ..Unable to load dynamic library
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With