I hope everyone is okay. Let’s go:
I’m trying to enable some php extensions and I can’t at all.
I use ubuntu with the following version:
- Distributor ID: Ubuntu
- Description: Ubuntu 22.04.2 LTS
- Release: 22.04
- Codename: jammy
Apache:
Server version: Apache/2.4.52 (Ubuntu)
Mysql:
mysql Ver 8.0.32-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu))
PHP
- PHP 8.2.5 (cli) (built: Apr 14 2023 04:27:02) (NTS)
- Copyright (c) The PHP Group
- Zend Engine v4.2.5, Copyright (c) Zend Technologies
- with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies
I went to the php.ini file, uncommented the necessary extensions:
/etc/php/8.2/apache2
I have already restarted apache2. I restarted the OS. And whenever I check through phpinfo(); it’s always the same.
php -m
- calendar
- Core
- ctype
- curl
- date
- exif
- FFI
- fileinfo
- filter
- ftp
- gd
- gettext
- hash
- iconv
- json
- libxml
- mysqli
- mysqlnd
- openssl
- pcntl
- pcre
- PDO
- pdo_mysql
- Phar
- posix
- random
- readline
- Reflection
- session
- shmop
- sockets
- sodium
- SPL
- standard
- sysvmsg
- sysvsem
- sysvshm
- tokenizer
- Zend OPcache
- zlib
- [Zend Modules]
- Zend OPcache
What could I do? Would it be a bug in the communication between the server and the language modules?
Thanks in advance.
3
Answers
Thanks for all your answers. I decided to uninstall everything and start over again. I've tried to use this "systemctl restart php8.2-fpm" and it doesn't work.
You need to restart php-fpm service for the modifications to take effect.
un-commenting will not work on Ubuntu/Debian libux as you should install extension like
sudo apt install php8.2-curl
i believe you do not have php-fpm installed with apache and using default …. hence you need to restart apache2 for changes to take effect. you can check if php-fpm is configured with apache either via phpinfo() or via
sudo service php8.2-fpm status
.you may refer this article for detailed information on how to install. Please also note you might have to add Ondřej Surý’s PHP PPA to get latest stable versions of php for ubuntu