@arnoldo.moen
To enable PHP extensions in Ubuntu, you can follow these steps:
1
|
sudo apt-get install php-extension-name |
Replace "extension-name" with the name of the PHP extension you want to install. For example, if you want to install the mysqli extension, the command would be:
1
|
sudo apt-get install php-mysqli |
1
|
sudo service php7.4-fpm restart |
Replace "php7.4-fpm" with the appropriate PHP service name for your system. You can check the PHP service name by running the command:
1
|
sudo service --status-all | grep php |
Alternatively, you may need to restart your web server. For example, to restart Apache, you can use the following command:
1
|
sudo service apache2 restart |
1 2 3 |
<?php phpinfo(); ?> |
Save the file and access it through a web browser. Search for the extension in the generated PHP info page to confirm if it is enabled.
Remember to replace "extension-name" with the actual name of the extension you installed.