0

(I'm running Apache 2.2 and PHP 5.4.14)

I'm having problems enabling cURL with PHP. I uncommented the extension=php_curl.dll line in php.ini and made sure that the dependencies libeay32.dll and ssleay32.dll exist in the path. I also restarted Apache. However, when I run phpinfo() I do not see a cURL header and trying to call a cURL function results in the following error: Fatal error: Call to undefined function curl_init() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\boxproject\php\lib\Box_Rest_Client.php on line 114

Does anyone see any problems with this process? Are there more ways to troubleshoot the problem? Thanks a lot for the help.

8
  • sure you're modifying the correct php.ini? there's usually two: one for command line and one for SAPI (web-server). Commented May 6, 2013 at 17:06
  • Yep, double checked after I saw your comment and I'm 99% sure I modified the right file. There's only one php.ini file in my installation path. Commented May 6, 2013 at 17:14
  • Did you check the apache log file? ( "wamp/logs/apache_error.log" if your install has been made with wamp). Commented May 6, 2013 at 17:25
  • I installed Apache and PHP individually but here is the log: [Mon May 06 10:36:06 2013] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function curl_init() in C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\boxproject\\get_access_token.php on line 16 Commented May 6, 2013 at 17:37
  • No message (in the logs and linked to curl) is displayed while Apache is restarting? Commented May 6, 2013 at 17:42

1 Answer 1

0

Step1: Uncomment the php_curl.dll from php.ini

Step2: Copy the following three files from php installed directory to the bin directory of Apache

libeay32.dll, libssh2.dll, ssleay32.dll

Step3: Restart apache.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.