How to install, enable and disable PHP curl module with Apache on Ubuntu Linux

Introduction

The objective of this guide is to show how to install, enable or disable PHP curl module with Apache web server on Ubuntu Linux.

Operating System

Ubuntu 20.04.3 LTS

`

Requirements

Root user access is required in order to install, enable or disable PHP curl module.

Difficulty Level

Easy

Step 1: Installation of curl module

Before installing curl module, i assume you are logged in as a root user and apache server is installed and running.

Install curl using below command:

># apt install libapache2-mod-php php-curl

Now restart the Apache webserver:

# systemctl apache2 restart

Step 2: Enable PHP Curl Module

To enable curl php module execute:

phpenmod curl

To apply changes restart apache service

# service apache2 restart

Step 3: Disable PHP Curl Module

To disable curl php module execute:

# phpdismod curl

To apply changes restart apache service

# service apache2 restart

Similar Posts