Menu

Apache 2 failed to load mod_auth_mysql

Help
eduardof
2004-10-29
2013-04-23
  • eduardof

    eduardof - 2004-10-29

    Hi guys:

    I'm having a bit of trouble getting this module to work with Apache 2.0.52 on Solaris 7.
    After wrestling with apxs all afternoon when I finally manage to compile the module, now Apache refuses to load it. Here is the message:

    Cannot load /usr3/local/apache2052/modules/mod_auth_mysql.so into server: ld.so.1: /usr3/local/apache2052/bin/apache2052: fatal: relocation error: file /usr3/local/apache2052/modules/mod_auth_mysql.so: symbol mysql_close: referenced symbol not found

    Here is the apxs command I used:
    ../../support/apxs -c -D APACHE2 -L/usr/local/mysql/lib -I/usr/local/mysql/include -lmysqlclient -lm mod_auth_mysql.c

    (I had to delete -lz otherwise it would not compile)

    This is what apxs expands to:

    /usr3/local/apache2052/build/libtool --silent --mode=compile gcc -prefer-pic  -DAP_HAVE_DESIGNATED_INITIALIZER -DSOLARIS2=7 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -I/usr3/local/apache2052/include  -I/usr3/local/apache2052/include   -I/usr3/local/apache2052/include  -I/usr/local/mysql/include -DAPACHE2  -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
    /usr3/local/apache2052/build/libtool --silent --mode=link gcc -o mod_auth_mysql.la -I/usr/local/mysql/include -DAPACHE2  -L/usr/local/mysql/lib -lmysqlclient -lm -rpath /usr3/local/apache2052/modules -module -avoid-version    mod_auth_mysql.lo

    Sorry for the long messages, but if anyone managed to have this working, please let me know how.
    Here is my environment:
    Solaris 7 
    Apache 2.0.52
    mod_auth_mysql 2.6.1
    gcc  2.8.2
    MySQL 3.23.33

    Thank you

     
    • Jerry Stuckle

      Jerry Stuckle - 2004-10-30

      Hello, Eduardo,

      I do have mod_auth_mysql working on several systems (but not Solaris).  It does work well.

      Well, it looks like you still don't have a clean compile.  What version of mysql and Apache are you using?

      When you compiled with -lz, what kind of error did you get?  AFAIK, mysql requires the zlib development libary - do yo have it installed?

      Also - I see the first step (which compiles it), but what about the second step (which installs it in the correct library)?  Did this work?

      The fact you have an error with mysql_close also points towards a compile/link error.

      Jerry

       
    • eduardof

      eduardof - 2004-11-01

      Thank you Jerry:

      I got it working now ! Thank you for reminding me of the install part. What was missing is this:
      ..../../support/apxs/ -i mod_auth_mysql.la

      This is my environment:
      Solaris 7 
      Apache 2.0.52
      mod_auth_mysql 2.6.1
      gcc 2.8.2
      MySQL 3.23.33

      Are you sure about libz ? I compiled and linked without it and it seems to be working.

      I also did with libz:
      The libz issue is kind of complicated.  This is what I had to do:

      1. Found libz here: /usr/openwin/lib/libz.so.1
      (What openwin library has to do with anything ?)

      2. created a symbolic link to it:
      ln -s libz.so.1 libz.so
      (otherwise gcc will not link libz.so.1)

      3. added this to apxs line: -L/usr/openwin/lib

      4. Then run apxs -i mod_auth_mysql.la
      (according to readme file)

      That seems to have done it.
      Thank you,
      -- Eduardo

       
    • Jerry Stuckle

      Jerry Stuckle - 2004-11-03

      Eduardo,

      Great - glad to hear you got it installed.

      BTW - I did change the README file instructions in the 2.7.0 release to clarify this process.  Hopefully the new file will be easier to understand.

      Jerry

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.