Tried to add mod_auth_mysql to a apche build without dso support:
./configure .... --module-add=/tmp/mod_auth_mysql.c ...
No complains
make
===> src/modules/extra
gcc -c -I../../os/unix -I../../include -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208119 -DEAPI -DNO_DL_NEEDED `../../apaci` mod_auth_mysql.c
mod_auth_mysql.c:278:19: mysql.h: No such file or directory
mod_auth_mysql.c:325: syntax error before '*' token
mod_auth_mysql.c:325: warning: data definition has no type or storage class
mod_auth_mysql.c: In function `open_db_handle':
mod_auth_mysql.c:378: syntax error before "mysql_conn"
mod_auth_mysql.c:383: `mysql_conn' undeclared (first use in this function)
mod_auth_mysql.c:383: (Each undeclared identifier is reported only once
mod_auth_mysql.c:383: for each function it appears in.)
mod_auth_mysql.c:383: warning: assignment makes pointer from integer without a cast
mod_auth_mysql.c:397: warning: assignment makes pointer from integer without a cast
mod_auth_mysql.c: In function `create_mysql_auth_dir_config':
mod_auth_mysql.c:442: `MYSQL_UNIX_ADDR' undeclared (first use in this function)
mod_auth_mysql.c: In function `get_mysql_pw':
mod_auth_mysql.c:664: `MYSQL_RES' undeclared (first use in this function)
mod_auth_mysql.c:664: `result' undeclared (first use in this function)
mod_auth_mysql.c:721: `MYSQL_ROW' undeclared (first use in this function)
mod_auth_mysql.c:721: syntax error before "data"
mod_auth_mysql.c:722: `data' undeclared (first use in this function)
mod_auth_mysql.c: In function `get_mysql_groups':
mod_auth_mysql.c:755: `MYSQL_RES' undeclared (first use in this function)
mod_auth_mysql.c:755: `result' undeclared (first use in this function)
mod_auth_mysql.c:793: `MYSQL_ROW' undeclared (first use in this function)
mod_auth_mysql.c:793: syntax error before "data"
mod_auth_mysql.c:794: `data' undeclared (first use in this function)
make[4]: *** [mod_auth_mysql.o] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/tmp/apache_inst/apache_1.3.31/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/tmp/apache_inst/apache_1.3.31'
make: *** [build] Error 2
Hope some can help me to build this module for apache without dso support.
Thanks in advance,
Chris Verhoef
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(as a collegue of Chris): can you give a clue how to do this? Because the Apache-configure doesnt eat '--with-mysql=/path/to/mysql'
Remember, we want to compile it without DSO support. Otherwise it could have been done with apxs...
Apache-configure output is telling me the following. I can pinpoint the fault, but dont know how to change it (see below, line 'using -L/usr/local/lib/mysql', which is not correct). Hence the error.
=== output from configure ===
Configuring for Apache, Version 1.3.31
+ using installation path layout: Apache (config.layout)
+ on-the-fly added and activated auth_mysql module (modules/extra/mod_auth_mysql.o)
+ activated php4 module (modules/php4/libphp4.a)
+ activated jk module (modules/jk/libjk.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ using "tr [a-z] [A-Z]" to uppercase
+ checking for system header files
+ adding selected modules
o rewrite_module uses ConfigStart/End
+ using -lgdbm for DBM support
enabling DBM support for mod_rewrite
o ssl_module uses ConfigStart/End
+ SSL interface: mod_ssl/2.8.19
+ SSL interface build type: OBJ
+ SSL interface compatibility: enabled
+ SSL interface experimental code: disabled
+ SSL interface conservative code: disabled
+ SSL interface vendor extensions: disabled
+ SSL interface plugin: Built-in SDBM
+ SSL library path: /tmp/apache_inst/openssl-0.9.7d
+ SSL library version: OpenSSL 0.9.7d 17 Mar 2004
+ SSL library type: source tree only (stand-alone)
o mysql_auth_module uses ConfigStart/End
+ using -L/usr/local/lib/mysql -lmysqlclient -lm for MySQL support
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Personally, I've never compiled Apache 1.x witout DSO support (and only a couple of times with it to test this module under Apache).
I did look at the doc, and it looks like the file src/Configuration.tmpl file has entries for EXTRA_CFLAGS, EXTRA_LIBS, etc. I suggest you check out these - for instance, setting something like
EXTRA_CFLAGS=-I/path_to_your_mysql_files/include
might work. You would need similar ones for the libraries library paths.
I would suggest you check the Apache documentation for more information on using the Apache tools.
Otherwise, I can play with this some here, but it will probably be a couple of weeks before I can spend any time in it.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Tried to add mod_auth_mysql to a apche build without dso support:
./configure .... --module-add=/tmp/mod_auth_mysql.c ...
No complains
make
===> src/modules/extra
gcc -c -I../../os/unix -I../../include -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DMOD_SSL=208119 -DEAPI -DNO_DL_NEEDED `../../apaci` mod_auth_mysql.c
mod_auth_mysql.c:278:19: mysql.h: No such file or directory
mod_auth_mysql.c:325: syntax error before '*' token
mod_auth_mysql.c:325: warning: data definition has no type or storage class
mod_auth_mysql.c: In function `open_db_handle':
mod_auth_mysql.c:378: syntax error before "mysql_conn"
mod_auth_mysql.c:383: `mysql_conn' undeclared (first use in this function)
mod_auth_mysql.c:383: (Each undeclared identifier is reported only once
mod_auth_mysql.c:383: for each function it appears in.)
mod_auth_mysql.c:383: warning: assignment makes pointer from integer without a cast
mod_auth_mysql.c:397: warning: assignment makes pointer from integer without a cast
mod_auth_mysql.c: In function `create_mysql_auth_dir_config':
mod_auth_mysql.c:442: `MYSQL_UNIX_ADDR' undeclared (first use in this function)
mod_auth_mysql.c: In function `get_mysql_pw':
mod_auth_mysql.c:664: `MYSQL_RES' undeclared (first use in this function)
mod_auth_mysql.c:664: `result' undeclared (first use in this function)
mod_auth_mysql.c:721: `MYSQL_ROW' undeclared (first use in this function)
mod_auth_mysql.c:721: syntax error before "data"
mod_auth_mysql.c:722: `data' undeclared (first use in this function)
mod_auth_mysql.c: In function `get_mysql_groups':
mod_auth_mysql.c:755: `MYSQL_RES' undeclared (first use in this function)
mod_auth_mysql.c:755: `result' undeclared (first use in this function)
mod_auth_mysql.c:793: `MYSQL_ROW' undeclared (first use in this function)
mod_auth_mysql.c:793: syntax error before "data"
mod_auth_mysql.c:794: `data' undeclared (first use in this function)
make[4]: *** [mod_auth_mysql.o] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/tmp/apache_inst/apache_1.3.31/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/tmp/apache_inst/apache_1.3.31'
make: *** [build] Error 2
Hope some can help me to build this module for apache without dso support.
Thanks in advance,
Chris Verhoef
Chris.
Did you set the path to the MySQL files in your configure? Note the first error:
mod_auth_mysql.c:278:19: mysql.h: No such file or directory
Jerry
Hi Jerry (or others),
(as a collegue of Chris): can you give a clue how to do this? Because the Apache-configure doesnt eat '--with-mysql=/path/to/mysql'
Remember, we want to compile it without DSO support. Otherwise it could have been done with apxs...
Apache-configure output is telling me the following. I can pinpoint the fault, but dont know how to change it (see below, line 'using -L/usr/local/lib/mysql', which is not correct). Hence the error.
=== output from configure ===
Configuring for Apache, Version 1.3.31
+ using installation path layout: Apache (config.layout)
+ on-the-fly added and activated auth_mysql module (modules/extra/mod_auth_mysql.o)
+ activated php4 module (modules/php4/libphp4.a)
+ activated jk module (modules/jk/libjk.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ using "tr [a-z] [A-Z]" to uppercase
+ checking for system header files
+ adding selected modules
o rewrite_module uses ConfigStart/End
+ using -lgdbm for DBM support
enabling DBM support for mod_rewrite
o ssl_module uses ConfigStart/End
+ SSL interface: mod_ssl/2.8.19
+ SSL interface build type: OBJ
+ SSL interface compatibility: enabled
+ SSL interface experimental code: disabled
+ SSL interface conservative code: disabled
+ SSL interface vendor extensions: disabled
+ SSL interface plugin: Built-in SDBM
+ SSL library path: /tmp/apache_inst/openssl-0.9.7d
+ SSL library version: OpenSSL 0.9.7d 17 Mar 2004
+ SSL library type: source tree only (stand-alone)
o mysql_auth_module uses ConfigStart/End
+ using -L/usr/local/lib/mysql -lmysqlclient -lm for MySQL support
Hi,
Personally, I've never compiled Apache 1.x witout DSO support (and only a couple of times with it to test this module under Apache).
I did look at the doc, and it looks like the file src/Configuration.tmpl file has entries for EXTRA_CFLAGS, EXTRA_LIBS, etc. I suggest you check out these - for instance, setting something like
EXTRA_CFLAGS=-I/path_to_your_mysql_files/include
might work. You would need similar ones for the libraries library paths.
I would suggest you check the Apache documentation for more information on using the Apache tools.
Otherwise, I can play with this some here, but it will probably be a couple of weeks before I can spend any time in it.
Jerry
Hi Jerry,
thanks. These were the ones that did the trick (for archive's sake):
EXTRA_LIBS="-L/opt/app/mysql/lib/mysql -lmysqlclient -lm -lz"
EXTRA_INCLUDES="-I/opt/apps/mysql/include/mysql"
Running like a chime!
Maarten
Hi Jerry,
thanks. These were the ones that did the trick (for archive's sake):
EXTRA_LIBS="-L/opt/app/mysql/lib/mysql -lmysqlclient -lm -lz"
EXTRA_INCLUDES="-I/opt/apps/mysql/include/mysql"
Running like a chime!
Maarten
Maarten,
Thanks for the info. I'll add it to the README file for the next release.
Jerry