doujie9882 2013-01-09 10:05
浏览 116
已采纳

调用未定义的函数curl_init(),但它已启用

I have WAMP and I am running PHP 5.3.13 with Apache 2.2.22.

I have enabled the extension by ticking php_curl. I have restarted my computer.

My code is saying:

Fatal error: Call to undefined function curl_init() 

Anyone think what might be going wrong?

My phpinfo does not say anything about curl but in the phpini it says:

;extension=php_bz2.dll

extension=php_curl.dll .

Code calling it is here:

class ***** {
  public static $oauth, $debug, $logger, $session_manager, $last_response;
  protected static $url, $client_id, $client_secret, $secret, $ch, $headers;

  const GET = 'GET';
  const POST = 'POST';
  const PUT = 'PUT';
  const DELETE = 'DELETE';

  public static function setup($client_id, $client_secret, $options = array('session_manager' => '*****Session')) {
  // Setup client info
  self::$client_id = $client_id;
  self::$client_secret = $client_secret;

  // Setup curl
  self::$url = empty($options['api_url']) ? 'https://api.*****.com:443' : $options['api_url'];
  self::$debug = false;
  self::$ch = curl_init();

This code comes from a trustworthy API. I have starred words that need not be shared.

  • 写回答

3条回答 默认 最新

  • dos71253 2013-01-09 12:20
    关注

    Replace the dll file found in ext folder with the correct version here:

    http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/

    I am using win 8 64bit so the version for me was:

    http://www.mediafire.com/?0hm40owj08y68p7

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测