Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Mysql 3.23.53a to work with Apache 2.0.44

Status
Not open for further replies.

wieglenda

IS-IT--Management
Feb 8, 2003
30
US
Hey all, I'm trying to compile the mod_auth_mysql.c module into apache 2.0.44, but I keep running into build errors. Things like "can't find mysql.h" errors even though I point to the file on install, and various other build problems. I have a version of mod_auth_mysql that was created on Dec 22, 2002 and I'm also worried that this version will not work with the latest apache build. Does anyone know how to get apache to work with mysql? Can I recompile apache to include it?

Thanks, Thomas
 
Received an error of, "cannot specify -o with a -c or -S and multiple compilations...
 
Exactly the same as you told me to type
gcc -fpic -DSHARED_MODULE -I/usr/local/apache2/ -c -L/usr/lib/mysql mod_auth_mysql.c -lmysqlclient
ld -Bshareable -o mod_auth_mysql.so mod_auth_mysql.o
 
Ok, this works on my module:
[tt]gcc -fpic -DSHARED_MODULE -I/usr/local/apache2/ -L/usr/lib/mysql -lmysqlclient -shared -o mod_auth_mysql.so mod_auth_mysql.c[/tt] //Daniel
 
Blah... seems like there is no love in this game...

mod_auth_mysql.c:245: parse error before "pool"
mod_auth_mysql.c: In function `open_db_handle':
mod_auth_mysql.c:293: warning: passing arg 4 of `ap_log_error' makes integer from pointer without a cast
mod_auth_mysql.c:293: warning: passing arg 5 of `ap_log_error' from incompatible pointer type
mod_auth_mysql.c: At top level:
mod_auth_mysql.c:302: parse error before '*' token
mod_auth_mysql.c: In function `create_mysql_auth_dir_config':
mod_auth_mysql.c:304: `p' undeclared (first use in this function)
mod_auth_mysql.c:304: (Each undeclared identifier is reported only once
mod_auth_mysql.c:304: for each function it appears in.)

Needless to say, no love... I'm about to give up messing with this thing.

Thomas
 
Ok, I think I know what's wrong... Add [tt]-DAPACHE2[/tt] to your [tt]gcc[/tt] command and it should compile fine. //Daniel
 
Ok, found out the problem...

You need to have mysql-devel package installed. After I installed that, and ran both you gcc command and the apxs command, it works like a champ.

Thanks for all the help and I wish I could have found this problem earlier.

Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top