1

I just upgraded to Ubuntu 18.04.1 LTS and went to check on my local apache2 installation by adding phpinfo() to an index file.

I do not see an entry for cURL or for XDebug.

Here's what I did:

  1. Again, I checked phpinfo() and no curl or xdebug options are shown.
  2. I went to /etc/php/7.1/apache2/php.ini and uncommented the following line extension=php_curl.dll.
  3. I then restarted apache.
  4. Also, my phpinfo() shows Loaded Configuration File /etc/php/7.1/apache2/php.ini and THAT is the one I've been editing.

However, WordPress still reports the following: PHP Fatal error: Call to undefined function curl_init().

I'm thinking I MUST be editing the wrong ini file.

Any ideas? I'm dead in the water here. 😥

1

The short answer is, if you are not finding the curl and/or xdebug extension/modules after an upgrade of the OS, you have to reinstall them.

In Debian compatible distributions such as Ubuntu the commands are:

sudo apt-get install php7.1-curl php-xdebug

After installing those PHP modules, restart Apache.

Package: php7.1-curl

CURL module for PHP [default]

This package provides the CURL module for PHP.

Xdebug:

Package: php-xdebug

Xdebug Module for PHP

The Xdebug extension helps you debugging your script by providing a lot of valuable debug information. The debug information that Xdebug can provide includes the following:

  • stack traces and function traces in error messages with:
    • full parameter display for user defined functions
    • function name, file name and line indications
    • support for member functions
  • memory allocation
  • protection for infinite recursions

Xdebug also provides:

  • profiling information for PHP scripts
  • script execution analysis
  • capabilities to debug your scripts interactively with a debug client

As for your edit, php_curl.dll is for Microsoft Windows and not Linux; please comment that again.

  • 1
    Greetings, I ran the above commands and now I see xdebug, but sadly still no curl. I DID run the following command "ls /etc/apache2/mods-enabled/php*" which gave the following results: ""/etc/apache2/mods-enabled/php7.1.conf /etc/apache2/mods-enabled/php7.1.load" – sleeper Aug 5 '18 at 20:33
  • Try apt-get install php7.0-curl instead – Rui F Ribeiro Aug 5 '18 at 20:40
  • 1
    I'm running 7.1 so I ran apt-get install php7.1-curl, restarted and WHALLA! Back in business (...I hope). Thanks! Please move your comment to an answer so I can give you credit. Thanks again to ALL posters. – sleeper Aug 5 '18 at 20:55
  • Done, answer updated. – Rui F Ribeiro Aug 5 '18 at 20:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.