PDA

View Full Version : Cannot compile PHP5 with CURL


ckissi
07-29-2008, 06:41 PM
Hello,

I'm trying to compile PHP5 with curl enabled from Admin web console but I cannot get it work.

Here is config:

--with-mysqli --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv--with-libxml-dir=/usr/lib/ --with-xml2 --with-curl


Here is the part of config.log

....
configure:32740: checking whether to enable calendar conversion support
configure:32778: result: no
configure:33078: checking whether to enable ctype functions
configure:33116: result: yes
configure:33416: checking for cURL support
configure:33455: result: yes
configure:33464: checking if we should use cURL for url streams
configure:33482: result: no
configure:33492: checking for cURL in default path
configure:33497: result: found in /usr
configure:33515: checking for cURL 7.10.5 or greater
configure:33529: result: libcurl 7.15.5
configure:33538: checking for SSL support in libcurl
configure:33542: result: yes
configure:33560: checking how to run the C preprocessor
configure:33678: result: gcc -E
configure:33702: gcc -E conftest.c
configure:33708: $? = 0
configure:33740: gcc -E conftest.c
conftest.c:201:28: error: ac_nonexistent.h: No such file or directory
configure:33746: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
...

As you can see it shows "ac_nonexistent.h: No such file or directory" I installed both gcc and gcc-c++ libraries but it doesn't work.
PHP version is 5.2.6 and OS is CentOS 5 64bit
Can you please help me with this ?
Thank you.

mistwang
07-30-2008, 11:48 AM
Have you installed "g++"?

mistwang
07-30-2008, 11:52 AM
You can also try adding "--with-libdir=lib64" configuration option.

ckissi
07-30-2008, 12:29 PM
I tried "yum whatprovides g++" but got nothing. What package contains this ?

mistwang
07-30-2008, 01:37 PM
It is in "gcc-c++" package. Just try "g++" from command line see if it works.

Make sure you have installed 64bit curl-devel package

mistwang
07-30-2008, 01:40 PM
If you are using cPanel + Litespeed, you should use our WHM plugin to build lsphp binary.
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:ezcpanel