By szskdgi
I found that my project uses php7.1 from phpinfo(). And from other forums, I found that uncommenting php_pdo_mysql.so from /etc/php/php7.1/apache2/php.ini and restarting the server solves the issue. But in my php.ini, there is only php_pdo_mysql.dll. Since it is a linux server, I know dll files don’t work. How do i install pdo?
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!
Hello,
If you’re running apache2, you can try to install the missing PHP module using the following command:
sudo apt-get install php7.1-mysql
If the system is unable to locate this package then it’s simply not available in the repositories that you have configured on the server.
If this is the case you can enable the Ondrej PHP repository by typing:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
Then you can try to install PDO again:
sudo apt install php7.1-pdo
If you’re still having issues, then my suggestion will be to check this article on DigitalOcean’s website and check the PHP part of it. Everything is explained really well and you should be able to sort this out:
Let me know how it goes.
Alex
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.