DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

How to Fix “cURL Is Not Installed in Your PHP Installation”

Find the PHP runtime that failed, install or enable its cURL extension, restart the correct service, and verify it through the same SAPI.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The message means that the PHP runtime handling your command or web request does not have PHP’s cURL extension loaded. Install or enable cURL for that specific PHP installation, restart the process that uses it, and verify through the same SAPI (CLI, Apache, PHP-FPM, IIS, or Composer) that originally failed.

What the error actually means

PHP’s cURL functions are provided by the curl extension, which connects PHP to the libcurl library. A server can have the operating-system curl command installed while PHP still reports that cURL is unavailable. Those are separate components.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The message can appear as “cURL is not installed in your PHP installation,” “Composer says ext-curl is missing,” or “PHP Startup: Unable to load dynamic library curl.” In every case, first determine which PHP executable, configuration file, version, and SAPI produced the error. CLI PHP and the PHP used by Apache, Nginx/PHP-FPM, or IIS often have different versions and different php.ini files.

Identify the failing PHP runtime

Run these commands in the environment where the failure occurs. For a command-line failure, use a terminal on the same machine and user account. For a website failure, inspect the web SAPI instead of assuming it matches CLI.

  1. Check the PHP version:

    php -v
  2. Find the configuration files PHP is using:

    php --ini

    Record both the “Loaded Configuration File” and the “Scan for additional .ini files” directory. An unexpected path or an empty configuration file is a common cause.

  3. Check whether the extension is loaded:

    php -m | grep -i curl

    On Windows, use php -m | findstr /i curl, or simply run php -m and inspect the output.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To inspect a web request, create a temporary file in the document root containing:

<?php
var_dump(PHP_VERSION, PHP_SAPI, php_ini_loaded_file(), extension_loaded('curl'));

Load that page through the affected site, note the values, and delete the file immediately afterward. A temporary phpinfo() page provides the same configuration detail, but it exposes sensitive server information and should never remain publicly accessible.

Choose the fix for your installation

Environment Typical remedy Important compatibility check
Debian or Ubuntu package installation Install php-curl, or a package such as php8.3-curl, then restart the PHP consumer. The package must match the PHP minor version actually running.
Windows binary Enable the bundled cURL extension in the active php.ini and make its dependent DLLs available. PHP architecture, thread-safety, extension directory, and DLL builds must match.
Source build Compile PHP with --with-curl=DIR against an installed libcurl. Headers, libraries, and the libcurl version must satisfy the PHP release.
Composer or a framework command Fix the PHP runtime used by that Composer executable, not merely the web server or another terminal. Check the executable path and its loaded modules.

Debian and Ubuntu: install the matching package

Use the distribution’s default PHP

On a system using the distribution’s default PHP stream, install the extension package with:

sudo apt update
sudo apt install php-curl

Package managers normally pull in the appropriate libcurl dependencies. Confirm the result:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
php -m | grep -i curl
php --ri curl

The second command displays cURL extension information, including the libcurl version linked to PHP. If it reports that the extension does not exist, the package was installed for a different PHP executable or the shell is selecting another binary.

Use a versioned PHP package when necessary

When multiple PHP minor versions are installed, use the package matching the runtime shown by php -v. For example, PHP 8.3 may require:

sudo apt install php8.3-curl

Do not install an arbitrary versioned package and assume it will load into every PHP version. A module built for one minor version may not load into another. MediaWiki’s current Debian/Ubuntu quickstart also lists php-curl among its APT prerequisites and uses php --ini to locate configuration.

Restart the process that loads PHP

CLI PHP reads the extension the next time you start the command, but a long-running web process must be restarted. Use the service that your server actually runs, for example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl restart apache2
sudo systemctl restart php8.3-fpm

For Nginx, restart the PHP-FPM service; restarting Nginx alone does not reload the PHP worker. Substitute the installed PHP-FPM version and service name. If you use Apache’s embedded module, restart Apache. Afterward, repeat the check through a web request, not only in the shell.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Windows: enable the bundled extension safely

Find the active php.ini

Run the exact PHP executable used by the failing command:

php --ini

Open the file shown as “Loaded Configuration File.” If the command says that no configuration file is loaded, create or select the correct php.ini for that PHP installation rather than editing a similarly named file elsewhere.

Enable cURL and verify extension_dir

In php.ini, locate the cURL extension line. Depending on the PHP build, it may appear as:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
extension=curl

Remove a leading semicolon if the line is commented. Some builds use a DLL filename; follow the format already used by the supplied configuration. Check that extension_dir points to the matching installation’s ext directory, for example:

extension_dir="

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.