本地项目中使用到curl_init()时出现Call to undefined function curl_init()的错误,去掉php.ini中的extension=php_curl.dll前的分号还是不行,phpinfo()中无curl模块,于是上网搜索并实践了如下方法,成功:

在使用php5的curl库进行get、post请求时,发现调用curl_init()函数出错。找到解决方案,备记一下。

环境: 
Window 10 x64、PHP 5.6.28、Apache 2.4.25

官网连接 http://php.net/manual/en/curl.installation.php

Move to Windows\system32 folder: 
libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll

Move to Apache24\bin folder 
libssh2.dll

Uncomment extension=php_curl.dll

  1. php安装根目录(例如:”D:\Program Files\Php”)和php扩展目录(例如:”D:\Program Files\Php\ext”)下,找到”libssh2.dll”, “php_curl.dll”, “ssleay32.dll”, “libeay32.dll”,拷贝到系统目录:”C:\Windows\System32”

  2. 同时把”libssh2.dll” 拷贝到Apache的bin目录下(例如:”D:\Program Files\Apache24\bin”)。

转载自:http://blog.csdn.net/yuanyuan95/article/details/70093069

windows下Call to undefined function curl_init() error问题的更多相关文章

  1. PHP ERROR : Call to undefined function curl_init()

    在使用PHP 的Curl方法时出现了以下错误 可能的解决办法: 在php.ini 中确保 启用了php_curl.dll组件 确保PHP版本 (PHP 4 >= 4.0.2, PHP 5, PH ...

  2. php命令行运行出现错误Call to undefined function curl_init()

    在windows命令行窗口下运行php命令,需要将php.exe所在的路径添加到Path环境变量,例如C:\wamp\bin\php\php5.4.3 启动Apache服务 在命令行中输入php te ...

  3. php运行出现Call to undefined function curl_init()解决方法

    php运行出现Call to undefined function curl_init() 64位win7/8 下PHP不支持CURL 除了将PHP.ini中的;extension=php_curl. ...

  4. PHP在 win7 64位 旗舰版 报错 Call to undefined function curl_init()

    代码在ubuntu下无缝运行OK 转到我的win7 64位 期间 学习机上 报错: Call to undefined function curl_init() 因为用到curl 远程抓取数据. 所以 ...

  5. Call to undefined function curl_init()解决方法

    今天在使用php中的 curl 扩展时 在开启

  6. 本地测试出现:Call to undefined function curl_init()

    网上搜索Call to undefined function curl_init(),清一色的以下解决办法: 1.在php.ini中找到extension=php_curl.dll,去掉前面的,php ...

  7. Mac下Call to undefined function imagettftext() 解决方案

    文章转载至Mac下Call to undefined function imagettftext()终极解决方案 安装了一套onethink程序准备调试,结果在登录页面发现验证码无法显示,单独访问验证 ...

  8. php提示:Call to undefined function curl_init

    我要利用curl函数进行数据采集时发现提示Call to undefined function curl_init错误了,后来从官网了解到因为curl默认不是php开启的函数,我们需要手工打开哦,下面 ...

  9. windows下PHP中Fatal error Call to undefined function curl_init()的解决方法

    参考官方解决方法:http://nz.php.net/manual/en/curl.installation.php 1.php安装目录下的ext文件夹下面是否有php_curl.dll文件,然后右键 ...

随机推荐

  1. IE脚本调试

    打开IE -- 工具 -- Internet选项 -- 高级 --有4项. 1.禁用脚本调试(Internet Explorer)(去掉对勾) 2.禁用脚本调试(其他)(去掉对勾) 3.显示每个脚本错 ...

  2. 【转】C++ 标准库值操作迭代器的常见函数

    迭代器是C++标准库中的重要组件,特别是在容器内部,没有迭代器,容器也就无所谓存在了. 例如:vector容器简而言之就是3个迭代器 start finish 以及end_of_storage vec ...

  3. 安装Tesseract

    下载网站 https://digi.bib.uni-mannheim.de/tesseract/

  4. git bash 学习2 --更改url 重置密钥 Permission denied (publickey)问题

    在今天的上传过程中,我意外地遇到了一个问题,,每一次push都会出现 $ git push origin master Permission denied (publickey). fatal: Co ...

  5. Linux 系统性能:观察、测试、调优

    一个完整运行的 Linux 系统包括很多子系统(介绍,CPU,Memory,IO,Network,…),监测和评估这些子系统是性能监测的一部分.我们往往需要宏观的看整个系统状态,也需要微观的看每个子系 ...

  6. DevOps - 配置管理 - Chef

    #!/bin/sh # WARNING: REQUIRES /bin/sh # # - must run on /bin/sh on solaris 9 # - must run on /bin/sh ...

  7. java util - MD5/AES/RSA快速调用工具

    测试代码 package cn.java.security; import java.security.Key; import java.util.Base64; import org.junit.A ...

  8. python3.7 倒计时

    #!/usr/bin/env python __author__ = "lrtao2010" # python3.7 倒计时 import time for i in range( ...

  9. Python 格式化

    数字前面补0 字符型: print('23'.zfill(5)) 数字型: print('%011d' % 124) 日期与str互转: datetime 转 str str_date = datet ...

  10. poj1142 Smith Numbers

    Poj1142 Smith Numbers Smith Numbers Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13854 ...