I tried to install openssl extension for php with pacman, but both php-openssl and php82-openssl are not found. How can I install it?
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/modules/pdo_pgsql (/usr/lib/php/modules/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_pgsql.so (/usr/lib/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/php/modules/openssl (/usr/lib/php/modules/openssl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/openssl.so (/usr/lib/php/modules/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'phar' (tried: /usr/lib/php/modules/phar (/usr/lib/php/modules/phar: cannot open shared object file: No such file or directory), /usr/lib/php/modules/phar.so (/usr/lib/php/modules/phar.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
I cannot post links. Probably my account is too new.
I installed it from AUR and copied the extension to the modules of the php 8.2 I use. cp /usr/lib/php82/modules/openssl.so /usr/lib/php/modules
So far it appears to work, but I haven’t tried with code yet, it is just loaded as openssl. Maybe I’ll have to set the Apache to use the php82 installed from AUR.
Well, I don’t how old your php script is, but since php7 openssl should be builtin.
php -m
php -i | grep ssl
Same for phar. Only needed external module would be pdo_pgsql.
The AUR version requires an external module because the main version php82 does not include openssl on build time. It is a pretty basic build. That is whole reason for that package on the AUR.