-1

I have been trying to enable curl on PHP 7.1.4 which is running off of Apache HTTPD 2.4. The steps I have taken so far are:

Uncomment extension=php_curl.dll
Ensure that the ext path is set correctly (I have tested this by enabling openssl which works)
Adding the PHP root folder to my PATH environment variable
Fully stopped the server and started again

Although the function var_dump(extension_loaded('curl')); is false and curl is not listed under phpinfo();

I have run PHP --ri curl and it states: cURL support => enabled cURL Information => 7.53.1

I have also run deplister on the curl dll and it states that all lines are ok.

Please could you advise me of any other debugging steps or silly mistakes that I could have made (I feel that I have spent too many hours looking at this problem and a fresh set of eyes...)

More system info: Compiler MSVC14 (Visual C++ 2015)
Architecture x64
Windows 7 platform

0

The PHP you run via command line and PHP Apache uses are two separate things. Your CLI version of PHP has the CURL extension and your mod_php / php-fpm version does not have it.

You need to install the extension to your mod_php / php-fpm version.

  • Thanks for the answer. What additional steps to the ones above (uncommenting the initial line ect.) Do I need to take to enable the extension? As these steps worked for other extensions such as openssl – user2502611 Apr 20 '17 at 6:25
  • You need to find where the PHP INI file for the Apache PHP is, and edit it. You need also to make sure that the version has the module available. – Tero Kilkanen Apr 20 '17 at 9:41
  • I have enabled it in the ini file and the php_curl.dll is in the ext folder and the author of curl is listed in phpinfo();. Does this mean that curl has the module available? – user2502611 Apr 20 '17 at 12:34
  • If phpinfo() shows the module, then it is loaded. – Tero Kilkanen Apr 20 '17 at 14:07
  • the module is only showed under the author category, which i do not think means it is enabled. It does not have it's own section like the other models​that are enabled do. – user2502611 Apr 20 '17 at 16:41

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.