[Ubuntu] $ ch = cur_init ();
Execution error, prompt
PHP Fatal error: Call to undefined function cur_init ();
But php5 php5-curl php-cli curl has been installed
# Curl-V
Curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP.
# Php-v
PHP 5.3.10-1ubuntu3. 13 with Suhosin-Patch (cli) (built: Jul 7 2014 18:54:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
However, to check whether the extension is loaded, the following message is displayed:
Exception: Extension curl does not exist
How can this problem be solved?
Reply to discussion (solution)
Have you written curl_init as cur_init?
Have you written curl_init as cur_init?
Oh, this is indeed an error, but it is not the cause.
The running result is as follows:
PHP Fatal error: Call to undefined function curl_init () in
That may be the configuration problem. if curl has been installed, is there any extension in the php configuration file? how can I add curl extension = curl. so?
That may be the configuration problem. if curl has been installed, is there any extension in the php configuration file? how can I add curl extension = curl. so?
It is a matter of expansion. As the above command is entered to check whether the Extension is added: Exception: Extension curl does not exist
The extension is added, but the matching path is incorrect.
It has been resolved in the morning.
Close the problem. Thanks