我有一个问题与cURL在2个网站


i have an issue with cURL in 2 sites

我在不同的机器上安装了2个drupal站点。在第一个,在列表中的状态报告中,我有:

cURL    cURL library Enabled

仅包含cURL的行…在第二个drupal站点上,我有:

cURL    cURL library Enabled
cURL    Enabled

在第二个文件上,我的模块使用cURL完美,而在第一个我不能使用cURL ....

你能告诉我为什么会发生这种情况吗?我怎么能纠正这个问题??

可能是因为服务器上没有curl库。您可以尝试安装卷曲在机器上或没有。可以在终端中创建test.php,代码如下:

// Check if curl module installed
if(!function_exists('curl_init')) {
    throw new Exception("cURL module not installed.");
}
phpinfo();

如果curl库存在但未启用,请检查php.ini的行';extension=php_curl.dll'。删除字符';'并重新启动服务器。php.