3

I have installed php curl. But still the curl module is not showing when I execute the command php -m.

OS version: Ubuntu 16.04 LTS PHP version: PHP 7.0.7

Installed modules for curl: curl, libcurl3, libcurl4-openssl-dev, php-curl, php7.0-curl

Please share your thoughts.

Thanks

Achu
  • 61
  • 1
  • 6
  • 1
    dll files are windows libraries. If you enable windows libraries on Ubuntu you will not go to space successfully enable cURL today. – DaveRandom Jun 09 '16 at 09:10
  • Thanks DaveRandom. Could you please advice, if you see any way to fix this issue on linux? – Achu Jun 09 '16 at 09:19
  • you might have forgotten to restart apache/httpd. – Ekin Jun 09 '16 at 09:32
  • I have restarted apache2 after installing curl libraries, but no use. I have restarted even the system also. But, still it does not load the curl module. :( – Achu Jun 09 '16 at 09:42
  • Try changing .dll to .so, verify that extension_dir points somewhere sensible and that the extension module file actually exists – DaveRandom Jun 09 '16 at 10:00
  • Thanks for the suggestion Dave. The curl.so is available in the location /usr/lib/php/20151012/curl.so and I enabled it in my php.ini and restarted the system. But, still php -m does not load curl module :( – Achu Jun 09 '16 at 10:42
  • Is you extension_dir directive pointed to that directory? – DaveRandom Jun 09 '16 at 12:20
  • Yes Dave. extension_dir is pointing to the same directory. extension_dir => /usr/lib/php/20151012 => /usr/lib/php/20151012 – Achu Jun 09 '16 at 12:49

1 Answers1

2

Fixed the issue with following steps:

Uninstalled php7.0-curl and curl by executing following commands:

sudo apt autoremove php7.0-curl
sudo apt autoremove curl

Then installed php-curl module again.

sudo apt-get install php-curl

Executed following commands to enable PHP 7.0 fpm

a2enmod proxy_fcgi setenvif
a2enconf php7.0-fpm

That's it. Now the curl module is loaded when checking "php -m" command. :)

Thanks.

Masoud Tavakkoli
  • 950
  • 13
  • 34
Achu
  • 61
  • 1
  • 6