views:

11

answers:

1

I am using CentOS distribution and I need to install newer version then 7.15.5. I couldn't upgrade to nower using yum, so I download sources, compile and install without problem.

[root ~]# curl -V
curl 7.21.1 (i686-pc-linux-gnu) libcurl/7.21.1 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Protocols: dict file ftp ftps http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp 
Features: IDN Largefile NTLM SSL libz 

However, when I display phpinfo() I see:

cURL support    enabled
cURL Information    libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

I restarted apache, tried even replacing old curl in /usr/bin/curl with symlink to newer version in /usr/local/bin/curl. Still no clue how to upgrade curl used by PHP.

+1  A: 

When you say you downloaded sources, do you mean you built php sources or curl from source? You need to compile php with with-curl=/usr/local/bin/curl option set to the version of libcurl you want to integrate.

burkestar
+1, and the documentation is clear: http://php.net/manual/en/curl.installation.php
Wrikken
I downloaded sources of curl. PHP stayed untouched. Is it possible to avoid compiling php when configure command has --witch-curl without given directory?
daniula
i don't think so as i believe php extensions are statically linked (php is written in C). Compiling php isn't difficult, just follow the directions. Instead you might try using PECL to do the dirty work for you - look for a libcurl PECL module.
burkestar
It wasnt so easy. Adding many various options during configure was quite hard. For the first time I forget about adding mysql support and after new php installation published sites went down. Luckily I found out fast way to downgrade to previous PHP version using rpm and yum and try one more time from scratch.
daniula