CURL not working in the latest version of PHP 7.2!

I tried to install the CURL in my server but failed. My server is running in Ubuntu 18.04 LTS & PHP 7.2 version. I used the command to install the CURL in my server.

The command I used:

  1. sudo apt-get install curl
  2. sudo service apache2 restartI restart my server using this command
  3. sudo apt-get install php7.2-curl
  4. sudo service apache2 restart Again I restarted my server.

But after this nothing works. The CURL Command is not executing.

curl

The output is nothing, Is there any way to install the CURL which is compatible with PHP7.2 version.

1

2 Answers

Need to use the following commands:

  1. sudo add-apt-repository ppa:ondrej/php
  2. sudo apt update
  3. sudo apt install php7.2-fpm php7.2-gd php7.2-curl php7.2-mysql php7.2-dev php7.2-cli php7.2-common php7.2-mbstring php7.2-intl php7.2-zip php7.2-bcmath

Then need to restart my server.

I tried this and it worked for me!

$ sudo apt-get install curl
$ sudo apt update
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt install php7.2-curl php7.2-mysql php7.2-dev php7.2-cli php7.2-intl
$ sudo service apache2 restart

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like