motionhosting

Member
Oct 25, 2005
7
0
151
Hello, when I use the buildapache script via WHM it compiles php with imap support but doesn't compile with the option --with-imap-ssl which makes the imap extension useless, because a php script cannot login via imap without this option. I tried modifying buildscript to force it compile php with this option but it seems that everything WHM tries to build apache it firstly downloads the entire buildapache download and my modifications are overwritten. This is a serious problem for php applications trying to use the imap extension and the only solution is to build php manually but this isn't a good solution as it can be easily overwritten in the future by CPanel.

Any ideas? Or could this be fixed in the buldapache functionality?
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
motionhosting said:
Hello, when I use the buildapache script via WHM it compiles php with imap support but doesn't compile with the option --with-imap-ssl which makes the imap extension useless, because a php script cannot login via imap without this option.

...the imap extension and the only solution is to build php manually but this isn't a good solution as it can be easily overwritten in the future by CPanel.
The other option you have is re-compiling Php, manually with the modules you want.
 

rviradia

Well-Known Member
Jul 25, 2005
46
0
156
I can compile imap-ssl okay, but when I compile regular imap I get (imap compiles fine through 'apache update' in whm):

./configure --with-imap=/usr/local/imap-2004g

checking whether build with IMAP works... no
configure: error: build test failed. Please check the config.log for details.

/usr/lib/libc-client.a(osdep.o)(.text+0xd2a4): In function `ssl_server_init':
: undefined reference to `SSLv23_server_method'
/usr/lib/libc-client.a(osdep.o)(.text+0xd3a9): In function `ssl_genkey':
: undefined reference to `RSA_generate_key'
/usr/lib/libc-client.a(osdep.o)(.text+0xd3e7): In function `ssl_genkey':
: undefined reference to `ERR_get_error'
/usr/lib/libc-client.a(osdep.o)(.text+0xd3f9): In function `ssl_genkey':
: undefined reference to `ERR_error_string'
/usr/lib/libc-client.a(osdep.o)(.text+0xd471): In function `ssl_server_input_wait':
: undefined reference to `SSL_get_fd'
/usr/lib/libc-client.a(osdep.o)(.text+0xd486): In function `ssl_server_input_wait':
: undefined reference to `SSL_pending'
/usr/lib/libc-client.a(osdep.o)(.text+0xd4ab): In function `ssl_server_input_wait':
: undefined reference to `SSL_read'
collect2: ld returned 1 exit status
configure: failed program was:
#line 48386 "configure"
#include "confdefs.h"


void mm_log(void){}
void mm_dlog(void){}
void mm_flags(void){}
void mm_fatal(void){}
void mm_critical(void){}
void mm_nocritical(void){}
void mm_notify(void){}
void mm_login(void){}
void mm_diskerror(void){}
void mm_status(void){}
void mm_lsub(void){}
void mm_list(void){}
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}

char mail_newbody();
int main() {
mail_newbody();
return 0;
}
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
rviradia said:
I can compile imap-ssl okay, but when I compile regular imap I get (imap compiles fine through 'apache update' in whm):

./configure --with-imap=/usr/local/imap-2004g

checking whether build with IMAP works... no
configure: error: build test failed. Please check the config.log for details.

/usr/lib/libc-client.a(osdep.o)(.text+0xd2a4): In function `ssl_server_init':
: undefined reference to `SSLv23_server_method'
Let's try this, add --with-openssl to your configure line.
 

rviradia

Well-Known Member
Jul 25, 2005
46
0
156
I get the same error, here's the full list;

./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-imap=/usr/local/imap-2004g --with-imap-ssl --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --with-mhash --enable-magic-quotes --with-mysqli --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-wddx --with-xmlrpc --with-zlib

Thanks
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
This should work:

./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-imap --with-imap-ssl --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --with-mhash --enable-magic-quotes --with-mysqli --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-wddx --with-xmlrpc --with-zlib
 

rviradia

Well-Known Member
Jul 25, 2005
46
0
156
without =/usr/local/imap-2004g on the end of --with-imap I get:

configure: error: This c-client library is built with Kerberos support.

Add --with-kerberos to your configure line. Check config.log for details.

then I used:

./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-imap=/usr/local/imap-2004g --with-imap-ssl --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --with-mhash --enable-magic-quotes --with-mysqli --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-wddx --with-xmlrpc --with-zlib

but got the same;

checking whether build with IMAP works... no
configure: error: build test failed. Please check the config.log for details.

configure:48375: checking whether build with IMAP works
configure:48413: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib -Wl,-rpath,/usr/local/imap-2004g/lib -L/usr/local/imap-2004g/lib conftest.c -lc-client -lcrypt -lpam -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -ldl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz 1>&5
/usr/lib/libc-client.a(osdep.o)(.text+0xbd41): In function `ssl_onceonlyinit':
: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/libc-client.a(osdep.o)(.text+0x4e6f): In function `write_db_entry':
: undefined reference to `__db185_open'
collect2: ld returned 1 exit status
configure: failed program was:
#line 48386 "configure"
#include "confdefs.h"


void mm_log(void){}
void mm_dlog(void){}
void mm_flags(void){}
void mm_fatal(void){}
void mm_critical(void){}
void mm_nocritical(void){}
void mm_notify(void){}
void mm_login(void){}
void mm_diskerror(void){}
void mm_status(void){}
void mm_lsub(void){}
void mm_list(void){}
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}

char mail_newbody();
int main() {
mail_newbody();
return 0;
}
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
rviradia said:
without =/usr/local/imap-2004g on the end of --with-imap I get:

configure: error: This c-client library is built with Kerberos support.

Add --with-kerberos to your configure line. Check config.log for details.
You need to read what the system is trying to tell you. It says,
Add --with-kerberos So, the new line should be:

./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --with-mhash --enable-magic-quotes --with-mysqli --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-wddx --with-xmlrpc --with-zlib
 

rviradia

Well-Known Member
Jul 25, 2005
46
0
156
unfortunately same result;

checking for IMAP support... yes
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... yes
checking for pam_start in -lpam... (cached) yes
checking for crypt in -lcrypt... (cached) yes
checking whether build with IMAP works... no
configure: error: build test failed. Please check the config.log for details.


configure:46991: checking for crypt in -lcrypt
configure:48348: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib conftest.c -lc-client -lcrypt -lpam -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -ldl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz 1>&5
/usr/lib/libc-client.a(osdep.o)(.text+0xbd41): In function `ssl_onceonlyinit':
: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/libc-client.a(osdep.o)(.text+0x4e6f): In function `write_db_entry':
: undefined reference to `__db185_open'
collect2: ld returned 1 exit status
configure: failed program was:
#line 48321 "configure"
#include "confdefs.h"


void mm_log(void){}
void mm_dlog(void){}
void mm_flags(void){}
void mm_fatal(void){}
void mm_critical(void){}
void mm_nocritical(void){}
void mm_notify(void){}
void mm_login(void){}
void mm_diskerror(void){}
void mm_status(void){}
void mm_lsub(void){}
void mm_list(void){}
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}

char auth_gssapi_valid();
int main() {
auth_gssapi_valid();
return 0;
}

configure:48375: checking whether build with IMAP works
configure:48413: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib conftest.c -lc-client -lcrypt -lpam -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto -ldl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz -lxml2 -lz -lm -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz 1>&5
/usr/lib/libc-client.a(osdep.o)(.text+0xbd41): In function `ssl_onceonlyinit':
: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/libc-client.a(osdep.o)(.text+0x4e6f): In function `write_db_entry':
: undefined reference to `__db185_open'
collect2: ld returned 1 exit status
configure: failed program was:
#line 48386 "configure"
#include "confdefs.h"


void mm_log(void){}
void mm_dlog(void){}
void mm_flags(void){}
void mm_fatal(void){}
void mm_critical(void){}
void mm_nocritical(void){}
void mm_notify(void){}
void mm_login(void){}
void mm_diskerror(void){}
void mm_status(void){}
void mm_lsub(void){}
void mm_list(void){}
void mm_exists(void){}
void mm_searched(void){}
void mm_expunged(void){}

char mail_newbody();
int main() {
mail_newbody();
return 0;
}
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
rviradia said:
/usr/lib/libc-client.a(osdep.o)(.text+0xbd41): In function `ssl_onceonlyinit':
: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/libc-client.a(osdep.o)(.text+0x4e6f): In function `write_db_entry':
: undefined reference to `__db185_open'
collect2: ld returned 1 exit status
configure: failed program was:
What is your OS and Php version are you trying to re-compile?
libc-client libraries, in this error message, is the problem. There might be other missing libraries.
 

rviradia

Well-Known Member
Jul 25, 2005
46
0
156
php 5.1.4, fedora core 2 in virtuozzo vps

strange thing is imap compiles file via WHM's Apache Update, but I need imap-ssl so I have to manually compile, is there a way to install imap-ssl with WHM's script?

thanks
 
Last edited:

rviradia

Well-Known Member
Jul 25, 2005
46
0
156
used the following and it seemed to work okay, thanks for your help

./configure --with-apxs=/usr/local/apache/bin/apxs --with-xmlrpc --with-ldap --with-iconv --with-kerberos --with-pspell --with-imap --with-imap-ssl --with-gettext --with-xml --with-dom --with-dom-xslt --with-dom-exslt=/usr/lib/exslt --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --with-freetype-dir --with-gd --enable-gd-native-ttf --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --enable-magic-quotes --with-mysql=/usr --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zlib --with-openssl --with-bz2 --enable-dba --with-flatfile --with-db4 --enable-dbase --enable-exif --enable-wddx --enable-trans-sid --enable-dio --enable-sysvsem --with-mcrypt --with-mhash