Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everyone - I have PHP 5.0.5 running on a CentOS 4 AMD64 server right now, and I need to upgrade to PHP 5.2.3. However, since a webmail client runs ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    May 2004
    Location
    Boston, MA
    Posts
    246

    Can't compile PHP 5.2.3 against IMAP


    Hi everyone -

    I have PHP 5.0.5 running on a CentOS 4 AMD64 server right now, and I need to upgrade to PHP 5.2.3. However, since a webmail client runs on this server, the new PHP module needs to be compiled with IMAP support. Apparently the version that works with PHP 5.2.3 is imap-2006f.

    So I downloaded and compiled imap-2006f and put the relevant files in /usr/include/imap-2006f. But when I try to configure PHP:
    Code:
    $ ./configure
    ...
    checking whether build with IMAP works... no.
    configure: error: build test failed. Please check the config.log for details.
    From config.log:
    Code:
    ...
    configure:48361: checking whether build with IMAP works
    configure:48399: gcc -o conftest -I/usr/include -g -O2  -L/usr/lib  -Wl,-rpath,/usr/local/lib -L/usr/loc
    al/lib -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib -Wl,-rpath,/usr/include/imap-2006f/lib -L/usr/
    include/imap-2006f/lib conftest.c -lc-client   -lcrypt -lpam -lfreetype -lpng -lz -ljpeg -lcurl -lz -lss
    l -lcrypto -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lcurl -lxml2 -lz -lm 1>&5
    /usr/lib/libc-client.a(osdep.o): In function `ssl_onceonlyinit':
    /usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:286: the use of `tmpnam' is dangerous, bette
    r use `mkstemp'
    /usr/lib/libc-client.a(osdep.o): In function `auth_gssapi_valid':
    /usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:64: undefined reference to `gss_nt_servic
    e_name'
    /usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:64: undefined reference to `gss_import_na
    me'
    /usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:67: undefined reference to `krb5_init_con
    text'
    ...
    I don't know where to look for the problem now. /usr/src/build doesn't even exist! Any input would be most appreciated.

    Here's config.nice (which comes mostly from the old PHP 5.0.5 directory:
    Code:
    './configure' \
    --prefix=/home/php5 \
    --with-mysql=/home/mysql \
    --with-apxs2=/home/httpd-new/bin/apxs \
    --with-imap=/usr/include/imap-2006f \
    --with-openssl \
    --with-ssl=/usr \
    --with-gettext \
    --with-mcrypt \
    --with-zlib \
    --with-gd \
    --with-jpeg-dir=/usr/local \
    --with-png-dir=/usr/local \
    --with-freetype-dir \
    --with-ttf \
    --with-curl=/usr/local/lib \
    "$@"
    Situations arise because of the weather,
    And no kinds of love are better than others.

  2. #2
    Linux Newbie
    Join Date
    May 2004
    Location
    Boston, MA
    Posts
    246
    Solved this. I tried it with imap-2006g instead, and it had the same issue but more useful output. The configure script failed to find the Kerberos config program, krb5-config, and therefore couldn't figure out what version of Kerberos was installed or where it was. Kerberos is the suite that has those gss_... functions that config.log reported missing. After downloading Kerberos from MIT and installing from source, and then specifying --with-kerberos=/usr/local to PHP's configure script, everything worked.
    Situations arise because of the weather,
    And no kinds of love are better than others.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •