How can I add mod_layout to XAMPP?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

How can I add mod_layout to XAMPP?

Postby test » 11. February 2006 20:07

Since there is no any add-on available for mod_layout to download on http://addons.xampp.org/. Then I had tried to compiled it by myself, but it seems that I had went to the wrong way since there is a lot of thing I had to trick a Makefile (e.g. made a symbolic link, copy some config_vars.mk, specials.mk, etc ... ) I did it because I need the Makefile of mod_layout compile properly. Finally I can not do it successfully. ;-(

Well, the question is:
How can I compile other mod for Apache which came along with XAMPP? Or is there any compiled mod available to download?


Note:My OS is Ubuntu.

Thank you in advance for any reply
Last edited by test on 13. February 2006 18:00, edited 2 times in total.
test
 
Posts: 9
Joined: 06. October 2005 22:18

Postby test » 13. February 2006 17:55

Hi there
Here is some update:
I had got one step closer to compile mod_layout for XAMPP by
1.Download development pkg, then
tar xvfz xampp-linux-devel-1.5.1.tar.gz -C /opt
2. Edit Makefile like this

Code: Select all
top_srcdir=/opt/lampp
top_builddir=/opt/lampp
include /opt/lampp/build/special.mk

#   the used tools
APXS=/opt/lampp/bin/apxs
APACHECTL=/opt/lampp/bin/apachectl


2. Then i try to make

But, the result come up with negative result :(

Code: Select all
/opt/lampp/bin/apxs -c mod_layout.c
/opt/lampp/build/libtool --silent --mode=compile gcc -prefer-pic -O6 -I/opt/lampp/include -L/opt/lampp/lib  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/opt/lampp/include  -I/opt/lampp/include   -I/opt/lampp/include -I/opt/lampp/include  -c -o mod_layout.lo mod_layout.c && touch mod_layout.slo
mod_layout.c: In function 'layout_filter':
mod_layout.c:293: error: syntax error before '{' token
mod_layout.c: At top level:
mod_layout.c:322: error: syntax error before 'if'
mod_layout.c:325: error: syntax error before '->' token
mod_layout.c:334: warning: parameter names (without types) in function declaration
mod_layout.c:334: warning: data definition has no type or storage class
mod_layout.c:335: error: syntax error before 'return'
mod_layout.c:548: error: syntax error before 'layout_conf'
mod_layout.c:549: error: syntax error before 'layout_conf'
mod_layout.c:554: error: syntax error before 'layout_conf'
mod_layout.c:555: error: syntax error before 'layout_conf'
mod_layout.c:556: error: syntax error before 'layout_conf'
mod_layout.c:561: error: syntax error before 'layout_conf'
mod_layout.c:562: error: syntax error before 'layout_conf'
mod_layout.c:563: error: syntax error before 'layout_conf'
mod_layout.c:564: error: syntax error before 'layout_conf'
mod_layout.c:565: error: syntax error before 'layout_conf'
apxs:Error: Command failed with rc=65536
.
make: *** [mod_layout.o] Error 1


Anybody got any idea?
test
 
Posts: 9
Joined: 06. October 2005 22:18

Postby test » 15. February 2006 17:50

Finally, I can made it compile by using apxs2 instead of apxs.

Code: Select all
root@ubuntu:/tmp/mod_layout-4.0.1a# make
/opt/lampp/bin/apxs2 -c mod_layout.c
/usr/bin/libtool --silent --mode=compile gcc -prefer-pic -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -I/usr/include/apache2  -I/usr/include/apr-0   -I/usr/include/apr-0 -I/usr/include  -c -o mod_layout.lo mod_layout.c && touch mod_layout.slo
mod_layout.c: In function 'layout_filter':
mod_layout.c:255: warning: unused variable 'body'
mod_layout.c: At top level:
mod_layout.c:463: warning: 'add_type' defined but not used
mod_layout.c:500: warning: 'merge_add' defined but not used
mod_layout.c:509: warning: 'footer_off' defined but not used
mod_layout.c:516: warning: 'header_off' defined but not used
mod_layout.c:523: warning: 'http_header_off' defined but not used
/usr/bin/libtool --silent --mode=link gcc -o mod_layout.la  -rpath /usr/lib/apache2/modules -module -avoid-version    mod_layout.lo
/opt/lampp/bin/apxs2 -c utility.c
/usr/bin/libtool --silent --mode=compile gcc -prefer-pic -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -I/usr/include/apache2  -I/usr/include/apr-0   -I/usr/include/apr-0 -I/usr/include  -c -o utility.lo utility.c && touch utility.slo
/usr/bin/libtool --silent --mode=link gcc -o utility.la  -rpath /usr/lib/apache2/modules -module -avoid-version    utility.lo
/opt/lampp/bin/apxs2 -c layout.c
/usr/bin/libtool --silent --mode=compile gcc -prefer-pic -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread -I/usr/include/apache2  -I/usr/include/apr-0   -I/usr/include/apr-0 -I/usr/include  -c -o layout.lo layout.c && touch layout.slo
/usr/bin/libtool --silent --mode=link gcc -o layout.la  -rpath /usr/lib/apache2/modules -module -avoid-version    layout.lo
/opt/lampp/bin/apxs2 -o liblayout.la -c mod_layout.lo utility.lo layout.lo
/usr/bin/libtool --silent --mode=link gcc -o liblayout.la  -rpath /usr/lib/apache2/modules -module -avoid-version    mod_layout.lo utility.lo layout.lo
#/opt/lampp/bin/apxs2 -c -o liblayout mod_layout.lo utility.lo layout.lo
#/opt/lampp/bin/apxs2 -i -a mod_layout.la
root@ubuntu:/tmp/mod_layout-4.0.1a#


But, once I tried to used my compiled library (liblayout.so) with Apache by added this following line to httpd.conf.

Code: Select all
LoadModule layout_module  /usr/lib/apache2/modules/liblayout.so


Then restart Apache, the message I got was shown as following:

Code: Select all
httpd: Syntax error on line 122 of /opt/lampp/etc/httpd.conf: API module structure `layout_module' in file /usr/lib/apache2/modules/liblayout.so is garbled - perhaps this is not an Apache module DSO?


Anybody has any suggestion?
test
 
Posts: 9
Joined: 06. October 2005 22:18


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 117 guests