Call to undefined function curl_init() error

放肆的年华 提交于 2019-11-30 15:23:21
nico

I had the same issue and after hours, I found a message here :

http://php.net/manual/curl.installation.php

which says, "Upgrading to php 5.6.9 on Windows 7 x64 cURL no longer is recognized. No errors on server start package just not available and didn't show in phpinfo.php. deplister.exe was ok I fixed coping the following list files from php folder (in my case D:\xampp\php) libeay32.dll, libssh2.dll, ssleay32.dll to c:\xampp\apache\bin (or your apache\bin path), restart Apache and works fine, Apache's libraries were outdated."

It worked for me.

Not easy to find, right ? :-)

leopold

Your issue is probably already solved. But for those still searching, please find my answer here.

It might be the the wrong Path being pointed at.

My answer in the Link ( Call to undefined function curl_init() even it is enabled in php7 ) says:

Your Filepath is probably incorrect

Check the Apache error log in

/var/log/apache2/error.log

if the called path or filename does match your real path in e.g.

/usr/lib/php/20151012/php_curl.so

In my case it's been the same path, but "the php_" was missing

/usr/lib/php/20151012/curl.so

So I changed the path / filename accordingly in

/etc/php/7.0/cli/conf.d/20-curl.ini 

from

extension=php_curl.so

into

extension=curl.so

Just add php folder path in PATH environment variable..... ;)

With PHP 7.2.4 and Apache 2.4.33 both installed on Windows 10x64 I got the same error: call to undefined function curl_init(). php.ini had extensions directory path and the php_curl extension defined and uncommented. Tried suggestions from earlier answers, no go.

Fixed it by adding my PHP location to system PATH (as C:\php) and restarting httpd (Apache2.4 service in my case).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!