Hello,
I would like to install IMAP library with my PHP 4.O.4 but every time I run a compilation with Apache 1.3.14
with params :
./configure --prefix=/opt/apache_1.3.14 --activate-module=src/modules/php4/libphp4.a

I get the fullowing error message :

Configuring for Apache, Version 1.3.14
+ using installation path layout: Apache (config.layout)
+ activated php4 module (modules/php4/libphp4.a)
Creating Makefile
Creating Configuration.apaci in src
make: Warning: File Makefile' has modification time in the future (2000-12-
21 15:28:32 > 2000-12-21 15:27:38)
cd ..; gcc -DLINUX=2 -I/home/sources/src/php-4.0.4 -I/home/sources/src/php-4.0.
4/main -I/home/sources/src/php-4.0.4/main -I/home/sources/src/php-4.0.4/Zend -I/
home/sources/src/php-4.0.4/Zend -I/home/sources/src/php-4.0.4/TSRM -I/home/sourc
es/src/php-4.0.4/TSRM -I/home/sources/src/php-4.0.4 -DUSE_EXPAT -I./lib/expat-li
te -DNO_DL_NEEDED
./apaci-o helpers/dummy helpers/dummy.c -rdynamic -Lm
odules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -lpam -limap -ldl
-lttf -lz -lpng -lgd -lresolv -lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt
/usr/lib/libimap.so: undefined reference to
mm_expunged'
/usr/lib/libimap.so: undefined reference to mm_diskerror'
/usr/lib/libimap.so: undefined reference to
mm_lsub'
/usr/lib/libimap.so: undefined reference to mm_flags'
/usr/lib/libimap.so: undefined reference to
mm_fatal'
/usr/lib/libimap.so: undefined reference to mm_nocritical'
/usr/lib/libimap.so: undefined reference to
mm_notify'
/usr/lib/libimap.so: undefined reference to mm_searched'
/usr/lib/libimap.so: undefined reference to
mm_status'
/usr/lib/libimap.so: undefined reference to mm_login'
/usr/lib/libimap.so: undefined reference to
mm_list'
/usr/lib/libimap.so: undefined reference to mm_critical'
/usr/lib/libimap.so: undefined reference to
mm_exists'
/usr/lib/libimap.so: undefined reference to mm_log'
/usr/lib/libimap.so: undefined reference to
mm_dlog'
collect2: ld returned 1 exit status
make:
[dummy] Error 1
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
o php4_module uses ConfigStart/End
+ checking sizeof various data types
+ doing sanity check on compiler and options
A test compilation with your Makefile configuration
failed. The below error output from the compilation
test will give you an idea what is failing. Note that
Apache requires an ANSI C Compiler, such as gcc.

======== Error Output for sanity check ========
============= End of Error Report =============

Aborting!

ps: mm_* symbols are defined in libmodphp4.a

What to do ???

    TRY THESE STEPS, ARE BLINDLY FROM THE TWOG SETUP FILE. MAKE SURE TO CHANGE THE VERSIONS IF YOU HAVE A DIFF VERSION

    1 - download:
    ftp://ftp.php3.com/pub/php-3.0.16.tar.gz
    ftp://ftp.apache.org/dist/apache-1.3.12.tar.gz
    ftp://ftp.cac.washington.edu/imap/imap-4.7.tar.Z
    http://screwdriver.net/twig/download/twig-2.4.0.tar.gz

    in to a directory that you can work in (i.e. /home/progs)

    2 - decompress the above:
    gzip -d php-3.0.16.tar.gz
    gzip -d apache-1.3.12.tar.gz
    gzip -d imap-4.7.tar.Z
    gzip -d twig-2.4.0.tar.gz

    3 - untar the above
    tar -xvf php-3.0.16.tar
    tar -xvf apache-1.3.12.tar
    tar -xvf imap-4.7.tar
    tar -xvf twig-2.4.0.tar

    4 - build IMAP
    change in to imap-4.7
    run make <system type>
    (where system type is slx for linux with shadow passwords)
    change in to c-client
    run ln -s /home/progs/imap-4.7/c-client lib
    run ln -s /home/progs/imap-4.7/c-client include
    (I'm not sure why the links are required but it's the only
    way I've been able to get php to compile...)

    5 - configure apache
    change into ../apache-1.3.12
    run ./configure

    6 - configure and make php
    change into ../php-3.0.16
    run ./configure --with-apache=../apache_1.3.12 --enable-track-vars --with-imap=/home/progs/imap-4.7/c-client
    (note the full path in the --with-imap setting,
    it is REQUIRED to be the full path)
    run make
    run make install

    7 - re-configure, build and install Apache
    change into ../apache-1.3.12
    run ./configure --activate-module=src/modules/php3/libphp3.a
    run make
    run make install

    8 - configure apache
    edit apache's httpd.conf file and change the following lines:

    	Add index.php3 to the DirectoryIndex line
    	In the <Directory rootdir> section change AllowOverride to All
    
    Add the following line:
    
    	AddType application/x-httpd-php3 .php3
    
    Add any other options you need for apache.
    
    At this time you may want to add apache to your startup 
    scripts to autostart each time you restart your system.

      Ok, problem found:

      The generated file src/modules/php4/libphp4.module
      misses in LIBS a -lmodphp4 after -limap in order
      to find missing mm_* symbols.

        7 days later

        Andy
        I get this error after adding the -limap to this file. Please help. Thanks.

        Creating Makefile
        Creating Configuration.apaci in src
        cd ..; gcc -DLINUX=2 -I/usr/local/etc/programs/php-4.0.4 -I/usr/local/etc/programs/php-4.0.4/main -I/usr/local/etc/programs/php-4.0.4/main -I/usr/local/etc/programs/php-4.0.4/Zend -I/usr/local/etc/programs/php-4.0.4/Zend -I/usr/local/etc/programs/php-4.0.4/TSRM -I/usr/local/etc/programs/php-4.0.4/TSRM -I/usr/local/etc/programs/php-4.0.4 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED ./apaci -o helpers/dummy helpers/dummy.c -Lmodules/jserv -L../modules/jserv -L../../modules/jserv -ljserv -rdynamic -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -limap -lpam -lc-client -ldl -lldap -llber -lz -lpng -lgd -lresolv -lm -ldl -lcrypt -lnsl -lresolv -lm -lcrypt
        /usr/bin/ld: cannot find -limap
        collect2: ld returned 1 exit status
        make: * [dummy] Error 1
        Creating Makefile in src
        + configured for Linux platform
        + setting C compiler to gcc
        + setting C pre-processor to gcc -E
        + checking for system header files
        + adding selected modules
        o php4_module uses ConfigStart/End
        o jserv_module uses ConfigStart/End
        + checking sizeof various data types
        + doing sanity check on compiler and options
        A test compilation with your Makefile configuration
        failed. The below error output from the compilation
        test will give you an idea what is failing. Note that
        ** Apache requires an ANSI C Compiler, such as gcc.

          Write a Reply...