Php probleme on ubuntu 18.04

hi guys i really need help right here so i installed php on ubuntu and everytime i try to enter php -m a message like this pop up
PHP Warning: PHP Startup: Unable to load dynamic library ‘pdo_mysql.so’ (tried: /usr/lib/php/20170718/pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/pdo_mysql.so.so (/usr/lib/php/20170718/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Are you looking to run PHP code, if so install apache2 (I think it comes pre installed on ubuntu can’t remember) or you can install xampp

Update your Ubuntu version and try re-installing php. Let us know if the problem continues.

1 Like

Try removing every instance of php on that server. Now reinstall and make sure that your php ini file has pdo_mysql.so uncommented from the config file. Create a new info.php page with <?php phpinfo(); ?> Inside of it. Test and make sure your configuration is correct by going to /info.php

2 Likes