2

I am getting the error "Call to undefined function curl_init()" [PHP, Apache, Windows] and I have tried everything from my side based on the responses on StackOverflow but still not able to fix it.

I installed php [5.6.25] in c:\php and Apache [2.4] in c:\Apache24

I have php.ini file both under c:\windows and c:\php as apache is loading it from c:\windows (configuration file path) and not from c:\php.

I have uncommented extension=php_curl.dll and mentioned extension_dir = "C:\php\ext" . In the php.ini file, I have also added the following lines

PHP5 module

LoadModule php5_module "c:/php/php5apache2_4.dll"

AddType application/x-httpd-php .php

PHPIniDir "C:/php"

I have copied several dlls such as libeay32.dll, ssleay32.dll and php_curl.dll to c:\Windows\System32 folder also.

I have set the path variable to c:\php; and c:\php\ext;

My httpd.conf also has the following statements

PHP5 module

LoadModule php5_module "c:/php/php5apache2_4.dll"

AddType application/x-httpd-php .php

PHPIniDir "C:/php"

I am not sure what I am missing as I have been trying to solve it for quite some time. Please suggest a systematic of troubleshooting. Any help is appreciated. I know this question has been asked several time but the issue is that I am still now able to get it working after trying everything.

jkdev
  • 11,360
  • 15
  • 54
  • 77
user1468768
  • 191
  • 2
  • 13
  • did you restart the wamp server after making the changes? If yes try printing and check if curl is enabled – Gandharv Sep 13 '16 at 07:16
  • you check this http://allinonescript.blogspot.in/2016/09/solved-curlinit-function-not-working-in.html and update or restart server – Vadivel S Sep 22 '16 at 05:37

1 Answers1

1

The problem was related to 32 bit vs 64 bit version of the apache server. I downloaded httpd-2.4.23-win64-VC14 and it worked for me

user1468768
  • 191
  • 2
  • 13
  • Nico's answer solved my problem: http://stackoverflow.com/questions/29838649/call-to-undefined-function-curl-init-error – endo64 May 16 '17 at 07:54