undefined symbol: mysql_select_db when reloading httpd with mod_auth_mysql.so INCLUDE
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
undefined symbol: mysql_select_db when reloading httpd with mod_auth_mysql.so INCLUDE
Greetings all,
I've been a lurker here for a long time, and this is my first post. Please be gentle.
I searched for solutions here on LQ.org and other resources online, but nothing so far has helped. The Slackware forum seems to be the most appropriate place for this question, but I'm willing to move it if needed.
I have Slackware r13.0 32 bit installed, and I'm interested in getting SNORT installed with Barnyard and BASE to learn about IDS using my own home network. I'm following a guide found here:
I'm having trouble getting past the "create the BASE tables" section. Everything up to that point seems to have been functioning properly. When I attempt to login with my username/password, I get rejected.
The httpd error log reports the following:
[DATE] [error] [client] user snort not found: /frontend
I can manually get into the mysql database with this username/password combination. I've been working on this on and off again for the past few days, and I forgot what led me to the mod_auth_mysql.so module, but I remember reading some posts elsewhere that pointed to this module. I found the source, and used apxs to compile and install it. However, when I insert the "LoadModule mysql_auth_module modules/mod_auth_mysql.so" line into the httpd.conf file, I can't restart the httpd service, and I'm given this error:
httpd: Syntax error on line 117 of /etc/httpd/httpd.conf: Cannot load /usr/modules/mod_auth_mysql.so into server: /usr/modules/mod_auth_mysql.so: undefined symbol: mysql_select_db
It seems that the frontend URL on my server is attempting to use php to authenticate to the mysql database. Am I on the right track here?
I've seen other posts with similar problems, but they recommend re-installing either mysql or php from the slackware site, but the Slackware package browser site (http://packages.slackware.it/) is down until a new one is written from scratch. Is there someplace else I can look for these packages if this is what is needed?
However, when I insert the "LoadModule mysql_auth_module modules/mod_auth_mysql.so" line into the httpd.conf file, I can't restart the httpd service, and I'm given this error:
httpd: Syntax error on line 117 of /etc/httpd/httpd.conf: Cannot load /usr/modules/mod_auth_mysql.so into server: /usr/modules/mod_auth_mysql.so: undefined symbol: mysql_select_db
Thanks for the help rworkman, I appreciate the catch on the LoadModule line in httpd.conf. Sometimes it takes a second set of eyes to catch the [relatively] obvious stuff.
It's still hanging up on the mysql_select_db symbol:
Code:
httpd: Syntax error on line 118 of /etc/httpd/httpd.conf: Cannot load /usr/lib/httpd/modules/mod_auth_mysql.so into server: /usr/lib/httpd/modules/mod_auth_mysql.so: undefined symbol: mysql_select_db
You used apxs to build it? I don't see how it would have built without the linked libraries being loadable. Have you done anything else to the system since building that module?
The problem looked similar enough, and I had been banging my head against the wall long enough that I was willing to try almost anything. It didn't work before that patch, and it doesn't work since.
The only way I can get httpd to restart is by commenting out this [newly fixed] line:
The patch is necessary to build the module, so that's not the problem. I just built it here, and it loads fine.
The missing symbol is provided by libmysqlclient.so
The output for the linux-gate.so.1 initially grabbed my attention, but a quick Google search taught me something new about that result in ldd output.
I'm still at a loss, and I still appreciate your help with this.
Ohh. It isn't linked with the mysql libraries. I don't know *why* - the apxs command you gave *should* have linked it, but something went wrong somehow. Start over: rebuild the apache module and copy the new one into place.
Hooray! One level of the onion has been peeled. Now I can restart httpd successfully at least. Thanks a tonrworkman and GazL for your help. It's helpful folks like you that attracted me to Linux in the first place.
If you don't mind, could you take a moment to explain what led you to interpret the ldd output the way you did? It looked acceptable to me, what gave it away that it wasn't linked to the mysql libraries?
Thanks again. Now I'm greeted with the error:
Code:
ADONewConnection: Unable to load database driver ''
But I'll beat my head against that for a while before bugging you all again. I'll create a new thread if:
a) I con't figure it out on my own
and
b) I can't find a thread somewhere else that points to a solution.
the result library file didn't contain (ldd mod_auth_mysql.so) libmyslclient, and the httpd didn't start (syntax error...etc.)
I must used -lmysqlclient in apxs command. The problem was that libmysqlclient.so was not in /usr/lib, instead of it,there were libmysqlclient.so.15, etc, so I created a symbolic link:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.