7

To enable cURL in PHP I uncomment this line

extension=php_curl.dll

But cURL did not load on restarting Apache. Even on restarting the machine. I have PHP 5.2.1 installed with AppServer on windows XP.

Please help me enabling cURL. Any kind of help is appreciated.

2
  • Do you have php_curl.dll in your PHP/ext directory? Commented Oct 12, 2011 at 10:03
  • Yes I have the php_curl.dll in my PHP/ext folder. Commented Oct 12, 2011 at 10:06

3 Answers 3

6

I upgraded to PHP 5.6.4 and curl stopped working. php.ini and ext were fine.

I solved this problem by adding C:\php (my php folder) to system variable Path in the Control Panel->System-Advanced->Environment Variables.

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

1 Comment

But this is probably linked with the libeay32 path problem. They are in /php/ folder so the Environment Variable solve the issue. So you have the choice of moving the files or make the path "global".
5

Try this out:

  1. Download the copy of the win32 PHP (not the installer one) from php.net (whichever php version that you want running on your webserver).

  2. Then from the dll folder, copy these two files: libeay32.dll and ssleay32.dll to your Windows/System32 (whichever Windows you have).

  3. And then from the extensions folder: get your php_curl.dll and place it under your /php/extensions folder.

  4. Check your php.ini to ensure it's referring to the correct extension folder, for example:

    extension_dir = "./extensions/"
    

    And uncomment your extension to php_curl.dll for example:

    extension=php_curl.dll
    
  5. Restart Apache

Thanks. Hope it works for you.

2 Comments

+1 Saved me an eternity of debugging. For me that didn't work right of the bat but i noticed i had the same files in the apache bin dir so i just removed them from there, restarted my server and there we go :)
Now with PHP 7 I can't get curl to load and unfortunately these instructions didn't help.
0

For others who didn't get php 7.1 to load with any of these answers, see Enable cURL on PHP7 windows10 64 bit Apache 2.4

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.