You are not logged in.
curl in a php script used to work before but after some update it stopped working. It gave me the following fatal error
Fatal error: Call to undefined function curl_init()
php_info show curl is installed and enabled
cURL support enabled
cURL Information 7.40.0
Age 3
Features
AsynchDNS Yes
CharConv No
Debug No
GSS-Negotiate No
IDN Yes
IPv6 Yes
krb4 No
Largefile Yes
libz Yes
NTLM Yes
NTLMWB Yes
SPNEGO Yes
SSL Yes
SSPI No
TLS-SRP Yes
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host x86_64-unknown-linux-gnu
SSL Version OpenSSL/1.0.2
ZLib Version 1.2.8
libSSH Version libssh2/1.4.3
php -m
[PHP Modules]
Core
ctype
curl
date
dom
ereg
fileinfo
filter
ftp
gd
gettext
hash
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
readline
Reflection
session
SimpleXML
soap
SPL
standard
tokenizer
XCache
XCache Cacher
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
XCache
XCache Cacher
php.ini (just the line related to curl)
extension=curl.so
Can someone help me with this issue?
Thanks.
Last edited by tri1976 (2015-02-09 11:37:09)
Offline
As a sanity check, can you show output of
php -m
just to see the curl module is there. Also, what is your /etc/php/php.ini
I certainly don't know much about this but thought these would help get more info.
Offline
@frank604 thanks for your help. I have edited the original post with additional information that you asked for. This problem has driven me crazy in the last few days and can't figure out why ... hope you can spot something. Also, curl work on command line.
Offline
Sorry I can't provide much help. Is there any journalctl entries from lighttd? or anything in lighttpd's logs? Another approach would be to take a look at pacman's logs and see which package upgrade caused this issue. Then you can try downgrading them.
Alternatively test curl in a simple php to see if it works?
<?php
$ch = curl_init();
?>
<b>Success!</b>
Offline
@frank604 Thanks for the attempt. curl_init is what giving me the fatal error. Nothing helpful from the log files. I rolled back a few version and no luck. I don't exactly know when it got broken so don't really know how far to rollback. Besides if the package has problem, I'd expect to find something on google or see more people having problem.
Offline