How to enable cURL in PHP / XAMPP

后端 未结 18 1622
难免孤独
难免孤独 2020-11-22 15:28

How do I enable cURL in PHP?

​​

相关标签:
18条回答
  • 2020-11-22 15:44

    Actually I did it by uncommenting extension=php_curl.dll in the xampp\apache\bin\php.ini file.

    0 讨论(0)
  • 2020-11-22 15:45

    Since you're using XAMPP, uncomment the line

    ;extension=php_curl.dll
    

    in xampp\apache\bin\php.ini, and then restart the Apache service.

    NB: In newer XAMPP versions, PHP has moved to root xampp folder xampp\php\php.ini.

    0 讨论(0)
  • 2020-11-22 15:46

    PHP 7^ version:

    sudo apt-get install php-curl
    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-11-22 15:46

    You can check phpinfo() (create a script containing and browse to it). This will tell you if you really do have it enabled. If not, read here.

    It is not recommended for the faint-hearted Windows developer.

    0 讨论(0)
  • 2020-11-22 15:48

    For windows OS users (It worked for me) in XAMPP.

    step 1: Go to C:\xampp\php\php.ini

    edit this file php.ini

    find curl- you will see a line ;extension=php_curl.dll.

    remove semicolon (;)extension=php_curl.dll. so this line looks like

    ;extension=php_curl.dll
    

    to

    extension=php_curl.dll
    

    step 2: copy ssleay32.dll, libeay32.dll from php folder. paste it in C:\Windows\System32\

    step 3: Restart the system . Curl will run successfully.

    0 讨论(0)
  • 2020-11-22 15:51

    On Debian with Apache 2:

    apt-get install php5-curl
    /etc/init.d/apache2 restart
    

    (php4-curl if it's php4)

    0 讨论(0)
提交回复
热议问题