I've used apxs to compile and everything seems to have gone smoothly, but when I add the LoadModule into httpd.conf and restart it errors. apachectl configtest reports the following:

Syntax error on line 244 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_auth_mysql.so into server: /usr/local/apache/libexec/mod_auth_mysql.so: Undefined symbol "
mysql_store_result"

Any ideas?

    8 months later

    Rod,
    Did you ever figure this one out? I'm working through the same problem.

    Stino Tapia

    author: rod k (216.179.0.5)
    Date: 2000-12-15 15:36:56

                                       I've used apxs to compile and everything seems to have gone smoothly, but when I add the LoadModule into
                                       httpd.conf and restart it errors. apachectl configtest reports the following: 
    
                                       Syntax error on line 244 of /usr/local/apache/conf/httpd.conf: 
                                       Cannot load /usr/local/apache/libexec/mod_auth_mysql.so into server:
                                       /usr/local/apache/libexec/mod_auth_mysql.so: Undefined symbol " 
                                       mysql_store_result" 
    
                                       Any ideas?
      a month later

      heay,

      please check your

      LD_LIBRARY_PATH

      use "echo $LD_PATH_LIBRARY"
      if those path can't find "so " file

      you moust add your mod*so path

      then ./apachectl restart

      will be ok!

        10 days later

        Similiar problem when running make install:

        gcc -I/usr/local/mysql/include -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED ./apaci \
        -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/auth_mysql/libauth_mysql.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a -L/usr/local/mysql/lib -lmysqlclient -lcrypt -lm -lcrypt
        /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function my_uncompress\':
        my_compress.o(.text+0x9a): undefined reference to
        uncompress\'
        /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function my_compress_alloc\':
        my_compress.o(.text+0x12a): undefined reference to
        compress\'
        collect2: ld returned 1 exit status
        make[2]: [target_static] Error 1
        make[2]: Leaving directory /usr/local/apache_1.3.20/src\'
        make[1]: *** [build-std] Error 2
        make[1]: Leaving directory
        /usr/local/apache_1.3.20\'
        make:
        [build] Error 2

        Does anyone have a solution? Where does the my_compress.o and my_uncompress.o come from?

          2 months later

          I'm having the exact same problem :/ Here are the spec's:
          FreeBSD 4.4
          MySQL 3.23.43
          Apache 1.3.20

          Any ideas anyone?
          Sabre

            10 days later

            same problems. Setup:

            Redhat 6.2
            Apache 3.14 w/SSL w/PHP4 (all compiled)
            MySQL 3.23.32 (RPM install)
            mod_auth_mysql 2.20

            tried as both apxs module and compiling into apache from source. Anyone had success??

            APXS:
            loading cache ./config.cache
            checking for gcc... (cached) gcc
            checking whether the C compiler (gcc ) works... yes
            checking whether the C compiler (gcc ) is a cross-compiler... no
            checking whether we are using GNU C... (cached) yes
            checking whether gcc accepts -g... (cached) yes
            checking whether gcc and cc understand -c and -o together... (cached) yes
            checking for ranlib... (cached) ranlib
            checking how to run the C preprocessor... (cached) gcc -E
            checking for crypt.h... (cached) yes
            checking for crypt... (cached) no
            checking for crypt in -lc... (cached) no
            checking for crypt in -lcrypt... (cached) yes
            checking for standard DES crypt... yes
            checking for extended DES crypt... yes
            checking for MD5 crypt... yes
            checking for Blowfish crypt... yes
            checking for Apache module support via DSO through APXS... yes
            checking for Apache module support via DSO through APACI... no
            checking for MySQL directory... /usr
            creating ./config.status
            creating Makefile
            creating libauth_mysql.module
            creating config.h
            config.h is unchanged

            Please run 'make'
            [root@xxxxx mod_auth_mysql-2.20]# make
            /usr/local/apache/bin/apxs -i -a -n auth_mysql libauth_mysql.so
            cp libauth_mysql.so /usr/local/apache/libexec/libauth_mysql.so
            cp: libauth_mysql.so: No such file or directory
            apxs:Break: Command failed with rc=1
            make: *** [install] Error 1

            Apache Source:
            unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a -L/usr/lib/mysql -lmysqlclient -lcrypt -lm -lcrypt -lndbm -ldl
            /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function my_uncompress':
            my_compress.o(.text+0x97): undefined reference to
            uncompress'
            /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function my_compress_alloc':
            my_compress.o(.text+0x12b): undefined reference to
            compress'
            collect2: ld returned 1 exit status
            make[2]: [target_static] Error 1
            make[2]: Leaving directory /updates/temp/apache_1.3.14/src'
            make[1]: *** [build-std] Error 2
            make[1]: Leaving directory
            /updates/temp/apache_1.3.14'
            make:
            [build] Error 2

              5 days later
              5 days later

              Found the problem!
              When I did a apachectl configtest, it told me that it could not find libmysqlclient.so.10. I looked in /usr/local/lib/mysql and it was there. I copied that file down one level to /usr/local/lib and Apache started up fine! This actually fixed a couple of other problems that I was having with MyTop too 🙂

                20 days later

                I got the same error message when compiling Apache 1.3.22 with MySQL 3.23.46 and PHP 4.1.0.

                Maybe some one can tell me more about what the heck I can do now? 🙁

                Thanks in advance,
                nFo

                  4 days later

                  I have run across the same problem when trying to compile Apache 1.3.22, PHP 4.1.1, and MySQL 3.23.47. One thing to note is the MySQL is the precompiled binary, I was reluctant to compile it because of the warning about the corrupt compiling issue (I am affected).

                  TIA,
                  Kevin

                    I got arround this issue with following things:
                    1. I recompiled MySQL from source for my system without any problems
                    2. Then I recompiled PHP from source with freshly compiled MySQL again without any problems.
                    3. And then I recompiled Apache from source without any errors.

                    Most probably it's related to MySQL Binary version and especially with 'libmysqlclient.a' file.

                    Best regards and Happy New Y2K+2 Year,
                    nFo

                      a month later

                      At step 6(d) of the installation (the Apache make), you might see this:
                      /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function 'my_uncompress':
                      my_compress.o(.text+0x9a): undefined reference to 'uncompress'
                      /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
                      my_compress.o(.text+0x12a): undefined reference to 'compress'
                      collect2: ld returned 1 exit status
                      make: *** [target_static] Error 1

                      Some people need to add "-lz" to their EXTRALIBS line in Configuration.apaci, step 6(a) :
                      EXTRA_LIBS=-L/usr/lib/mysql -lmysqlclient -lm -lz

                      </Ruslan>

                        13 days later

                        Worked like a charm.

                        Thanks very much

                        Jim

                          4 months later

                          Some people need to add "-lz" to their EXTRALIBS line in Configuration.apaci, step 6(a) :
                          EXTRA_LIBS= -L/usr/local/mysql/lib/mysql -lmysqlclient -lm -lz

                          PERFECT!!!!!!!!

                          just rem to ldconfig after

                            Write a Reply...