I have execute the below
sudo apt-get install php5-curl
result was
root@digin-demo-app:/var/www/html# sudo apt-get install php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-curl is already the newest version.
The following packages were automatically installed and are no longer required:
libgcrypt11-dev libgnutls-dev libgnutlsxx27 libgpg-error-dev libp11-kit-dev
librtmp-dev libtasn1-6-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
root@digin-demo-app:/var/www/html#
But when i try php -m command it shows only below modules.Kindly help me on this
root@digin-demo-app:/var/www/html# php -m
[PHP Modules]
calendar
Core
ctype
date
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mhash
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib
[Zend Modules]
Zend OPcache
I don't know if you found a solution to your issue, but anyway, it may help someone else. I was in the same situation and wanted to install curl for php5.6 I used the same command as yours but didn't work until I found this on some forums
sudo apt-get install php5.6-curl php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-xml php5.6-xmlrpc
Try with install required dependency
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
after this restart apache
sudo service apache2 restart
or
sudo service httpd restart
Make sure the extension is enabled.
cd /etc/php5/apache2/
sudo nano php.ini
add this command: extension=curl.so
then restart apache again
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.