How to enable cURL in PHP / XAMPP

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

How do I enable cURL in PHP?

​​

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

    Since XAMPP went through some modifications, the file is now at xampp/php/php.ini.

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

    For Ubuntu (and probably all Debian-Based) Linux Distributions:

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

    You might have seen PHP Fatal error: Call to undefined function curl_init() before.

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

    If none of the above solves your problem and have installed with php-x86 (Windows 32 bit), then problem may be of openssl - for more info : How to fix libeay32.dll was not found error

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

    If you're are using MAMP, cURL is enabled by default.

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

    to install php5-curl under opensuse:

    sudo yast2
    

    ->software ->software management ->search for curl ->check php5-curl case and accept.

    after installation you need to restart apache server

    service apache2 restart
    
    0 讨论(0)
  • 2020-11-22 16:01

    Steps for Windows 7:

    1. Ensure that the php.ini file that the PHP engine uses is the one you think it is.
    2. Ensure extension_dir in php.ini is correctly set to the ext folder
    3. Ensure extension=php_curl.dll in the php.ini is uncommented

    Finally and maybe the one most people don't know: 4. Ensure that there are these two files in the Windows System32 folder: libeay32.dll ssleay32.dll If not there, you may copy these two files from the php folder.

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