8

I'm Developing an application that uses curl scripts, and i have 2 versions of php (php 7.0 and php 5.6) in my ubuntu 16.04 computer. for php7.0 i have installed curl by issuing

sudo apt-get install php-curl

i was successful and i used curl when i'm using php7.0. but for some reasons i had to switch to php5.6. for that version of php the curl functions are not working. then after few google searches i found an answer and i tried to install curl for php5 bu issuing the below command.

sudo apt-get install php5-curl

it prompted a warning says that php5-curl package is not found. then i found there is an another package php5.5-curl, i installed that, still i don't get the curl working in php5.6.

1 Answer 1

23

If you use php 5.6, try this

sudo apt-get install php5.6-curl
Sign up to request clarification or add additional context in comments.

2 Comments

don't forget to restart the server after this installing curl
Thanks! A similar approach works also for other extensions: e.g. sudo apt-get install php5.6-ssh2 for ssh2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.