How to enable extension PDO in my ubuntu droplet
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
You can do this with:
sudo apt-get update
sudo apt-get install pdo-mysql php5-mysql
If after this you are unable to use the extension you can check your /etc/php5/apache2/php.ini and make sure it includes:
extension=pdo.so
extension=pdo_mysql.so
PHP should already have PDO extension enabled. What you probably need is the mysql driver for it.
# test if php5-mysql package is installed
dpkg-query --status php5-mysql | grep Status
# install the package if the above command indicates that it is not installed
sudo apt-get install php5-mysql
[Edit: oops, @ryanpq already answered]
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.