Thursday, November 22, 2018

Install the PHP module curl Ubuntu




I have following error messge for my web server in  Ubuntu after CAS server upgrade
"You need to install the PHP module curl to be able to use CAS authentication."
The following steps is to install the PHP module curl at Ubuntu:
1)  Install CURL
sudo apt-get install curl
2) restart Apache
sudo service apache2 restart
3)  Install PHP CURL
sudo apt-get install php-curl
( note: do not run sudo apt-get install php5-curl
it will return message:
"Package 'php5-curl' has no installation candidate"
In Ubuntu 16.04 default PHP version is 7.0, if you want to use different version then you need to install
 PHP package according to PHP version:

    PHP 7.2: sudo apt-get install php7.2-curl
    PHP 7.1: sudo apt-get install php7.1-curl
    PHP 7.0: sudo apt-get install php7.0-curl
    PHP 5.6: sudo apt-get install php5.6-curl
    PHP 5.5: sudo apt-get install php5.5-curl
   
    or just run sudo apt-get install php-curl
)
4) restart Apache
sudo service apache2 restart   

Another notes:
remove php 5 package
a) check php5 package
dpkg -l | grep php5
dpkg --purge --force-all php5-curl
b) remove
sudo dpkg --purge --force-all php5-curl
sudo apt-get remove php5-*
sudo apt-get purge php5-*
sudo apt-get autoremove
dpkg -l | grep php5
c) check unix server OS and version
 uname -a
Linux facts2 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
d) du -k
check space used
f) df -k
check space available
 

No comments:

Post a Comment