matthewbaynham Posted June 17, 2020 Share Posted June 17, 2020 Ubuntu 20.04 (desktop version) in a VirtualBox Bitnami Lampstack 7.2.31 PHP 7.4.6 GLPI 9.5.0 rc1 Missing extensions: CAS sodium I want to setup a test machine to look at GLPI and see if it's any good but there are a couple of php extensions I need to install. It doesn't matter what I do to install them GLPI says they are not installed. I have seen that I have two php.ini files which makes me think that PHP might be installed twice in different locations. And when I try to install the extension it might be installing the extension in the wrong PHP installation. These two php.ini /home/matthew/lampstack/php/etc/php.ini /etc/php/7.4/cli/php.ini I've tried editing the php.ini files and I've tried following different tutorials telling me to For example with CAS I get:matthew@matthew-GLPI:/etc/php/7.4/cli$ sudo apt-get install -y php-cas [sudo] password for matthew: Reading package lists... Done Building dependency tree Reading state information... Done php-cas is already the newest version (1.3.8-1). 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded. matthew@matthew-GLPI:/etc/php/7.4/cli$ Note: I get errors when I check the version, but I loads of errors trying to get ldap extension installed and despite this error GLPI recognises it and says it's installed.matthew@matthew-GLPI:/etc/php/7.4/cli$ php -v PHP Warning: PHP Startup: Unable to load dynamic library 'ldap' (tried: /usr/lib/php/20190902/ldap (/usr/lib/php/20190902/ldap: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/ldap.so (/usr/lib/php/20190902/ldap.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: Module 'sodium' already loaded in Unknown on line 0 PHP 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies How do I specify which php installation to install an extension to when doing a install command on the command line? What am I getting wrong? I'm generally confused. Quote Link to comment Share on other sites More sharing options...
requinix Posted June 17, 2020 Share Posted June 17, 2020 What is the "lampstack" thing you seem to have installed? Ubuntu has a perfectly good LAMP stack available for installation through apt, and it takes care of all this cli-vs-webserver configuration stuff for you. Quote Link to comment Share on other sites More sharing options...
matthewbaynham Posted June 17, 2020 Author Share Posted June 17, 2020 @requinix I didn't know about Ubuntu's LAMP, I didn't even research it, I've always use the LAMP from Bitnami. Thank you. Quote Link to comment Share on other sites More sharing options...
gizmola Posted June 17, 2020 Share Posted June 17, 2020 You just need to use the Ubuntu package installers inside the shell in your ubuntu vm, which in your case is probably something like this to get both packages: sudo apt-get update && sudo apt-get install libsodium-dev; sudo pecl install -f libsodium sudo apt install php-cas You are going to need to stop/start php-fpm & apache after you installed the packages. Do checks with php -i and phpinf() and make sure that the packages are being seen by by command line php and php in apache. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.