Hi,
I'm the maintainer of the Apache for Cygwin port, various apache
modules and the CAMP binary distribution. After releasing the latest
CAMP package which contains many popular modules (mod_php, mod_ssl,
mod_dav, etc) there have been requests from Apache for Cygwin users to
included mod_perl if possible.
There are two alternatives to use mod_perl:
1. Static apache module:
Please follow the instructions from Alexander Solovey at
http://www.mail-archive.com/[email protected]/msg21136.html
Special thanks to Alexander Solovey for figuring this out!
2. DSO/DLL shared apache module:
This is possible for the apache_1.3.22-i686-whatever-cygwin.tar.gz
binary distribution found at http://apache.dev.wapme.net
step 1: follow the instructions for the static apache module
step 2: use the following Makefile construction instead:
$ perl Makefile.PL USE_APACI=1 EVERYTHING=1 \
PERL_EXTRA_CFLAGS=-DUSEIMPORTLIB DO_HTTPD=1 USE_DSO=1
step 3: patch src/modules/perl/Makefile as defined in the attached
Makefile.diff patch.
step 4: now run "make" within mod_perl-1.2.6.
The first run will claim about no "libhttpd.dll". Please
touch src/modules/perl/libperl.dll and re-run "make" after
libhttpd.dll has been build.
(see src/modules/standard/Makefile.Cygwin for more info)
step 5: place the libperl.dll into /usr/local/apache/libexec and
add the required directives to httpd.conf.
Unfortunatly the libperl.dll _breaks_ apache's httpd process if
configured ok. When trying to start httpd it troughts a
STATUS_ACCESS_VIOLATION exception.
Attached is the "error_log" file and a tailed output of "strace
httpd.exe".
If there is someone who can explain me how to use the information to
find the resulting error, I would be very thankfull.
BTW, a shared DLL version of mod_perl is working using "httpd -X",
apache's single process mode.
Stas, can we include necessary changes to mod_perl when we fix this,
so we have out-of-the-box support?
Stipe
[EMAIL PROTECTED]
-------------------------------------------------------------------
Wapme Systems AG
M�nsterstr. 248
40470 D�sseldorf
Tel: +49-211-74845-0
Fax: +49-211-74845-299
E-Mail: [EMAIL PROTECTED]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are
--- src/modules/perl/Makefile Tue Oct 16 10:57:46 2001
+++ src/modules/perl/Makefile.cygwin Tue Oct 16 10:56:40 2001
@@ -13,7 +13,7 @@
EXTRA_CFLAGS=-DUSEIMPORTLIB -DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO
-fno-strict-aliasing `$(SRCDIR)/apaci`
EXTRA_LDFLAGS=
EXTRA_LIBS=
-EXTRA_INCLUDES=
+EXTRA_INCLUDES=-I/usr/lib/perl5/5.6.1/cygwin/CORE
EXTRA_DEPS=
CC=env LD_RUN_PATH=/usr/lib/perl5/5.6.1/cygwin/CORE gcc
LDFLAGS_SHLIB_EXPORT=-s
@@ -32,10 +32,10 @@
PERL_CCCDLFLAGS=
PERL_DEFS= -DMOD_PERL_VERSION=\"1.26\" -DMOD_PERL_STRING_VERSION=\"mod_perl/1.26\"
-DNO_PERL_SSI=1
PERL_INC=/usr/lib/perl5/5.6.1/cygwin/CORE
-PERL_LD=ld2
-PERL_LDFLAGS= -s -L/usr/local/lib
-PERL_LDDLFLAGS= -s -L/usr/local/lib
-PERL_LIBS= -s -s -L/usr/local/lib
/usr/lib/perl5/5.6.1/cygwin/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl5/5.6.1/cygwin/CORE -lperl -lcrypt
+PERL_LD=gcc
+PERL_LDFLAGS= --shared -L/usr/local/lib
+PERL_LDDLFLAGS= --shared -L/usr/local/lib
+PERL_LIBS= --shared -L/usr/local/lib
+/usr/lib/perl5/5.6.1/cygwin/auto/DynaLoader/DynaLoader.a
+-L/usr/lib/perl5/5.6.1/cygwin/CORE -lperl -lcrypt ../../libhttpd.dll
PERL_XSINIT=perl -MExtUtils::Embed -e xsinit
PERL_XSUBPP=perl /usr/lib/perl5/5.6.1/ExtUtils/xsubpp -nolinenumbers -typemap
/usr/lib/perl5/5.6.1/ExtUtils/typemap
PERL_AR=ar
@@ -140,6 +140,10 @@
$(MP_RANLIB) $@
libperl.so: $(MP_OBJS_PIC)
+ $(MP_RM) $@
+ $(MP_LD) $(MP_LDFLAGS_SHLIB) -o $@ $(MP_OBJS_PIC) $(MP_LIBS)
+
+libperl.dll: $(MP_OBJS_PIC)
$(MP_RM) $@
$(MP_LD) $(MP_LDFLAGS_SHLIB) -o $@ $(MP_OBJS_PIC) $(MP_LIBS)
[Tue Oct 16 10:42:40 2001] [error] [client 127.0.0.1] File does not exist:
/usr/local/apache/htdocs/server-info
[Tue Oct 16 10:43:31 2001] [warn] pid file /usr/local/apache/logs/httpd.pid
overwritten -- Unclean shutdown of previous Apache run?
221784 [main] httpd 1020 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
252711 [main] httpd 1020 stackdump: Dumping stack trace to httpd.exe.stackdump
[Tue Oct 16 10:44:50 2001] [warn] pid file /usr/local/apache/logs/httpd.pid
overwritten -- Unclean shutdown of previous Apache run?
226194 [main] httpd 368 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
258748 [main] httpd 368 stackdump: Dumping stack trace to httpd.exe.stackdump
[Tue Oct 16 10:44:59 2001] [warn] pid file /usr/local/apache/logs/httpd.pid
overwritten -- Unclean shutdown of previous Apache run?
225297 [main] httpd 1252 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
262393 [main] httpd 1252 stackdump: Dumping stack trace to httpd.exe.stackdump
193 217606 [main] httpd 1252 symlink_info::check: 0 = symlink.check
(C:\cygwin\usr\local\apache\logs\httpd.pid, 0x240F5D9) (0xA)
702 218308 [main] httpd 1252 path_conv::check: GetVolumeInformation(C:\) = OK,
full_path(C:\cygwin\usr\local\apache\logs\httpd.pid), set_has_acls(8)
240 218548 [main] httpd 1252 fhandler_base::open:
(C:\cygwin\usr\local\apache\logs\httpd.pid, 0x601)
747 219295 [main] httpd 1252 fhandler_base::open: 208 = CreateFileA
(C:\cygwin\usr\local\apache\logs\httpd.pid, 0x40000000, 0x7, 0x6108517C, 0x2, 0x80, 0)
215 219510 [main] httpd 1252 fhandler_base::open: filemode set to binary
183 219693 [main] httpd 1252 fhandler_base::open: 1 = fhandler_base::open
(C:\cygwin\usr\local\apache\logs\httpd.pid, 0x601)
183 219876 [main] httpd 1252 fhandler_disk_file::open: 1 = fhandler_disk_file::open
(C:\cygwin\usr\local\apache\logs\httpd.pid, 0x601)
183 220059 [main] httpd 1252 _open: 3 = open (/usr/local/apache/logs/httpd.pid,
0x601)
180 220239 [main] httpd 1252 _cygwin_istext_for_stdio: _cygwin_istext_for_stdio (3)
179 220418 [main] httpd 1252 _cygwin_istext_for_stdio: _cifs: get_*_binary
230 220648 [main] httpd 1252 fhandler_disk_file::fstat: 1 =
GetFileInformationByHandle (C:\cygwin\usr\local\apache\logs\httpd.pid, 208)
204 220852 [main] httpd 1252 get_nt_attribute: file:
C:\cygwin\usr\local\apache\logs\httpd.pid
183 221035 [main] httpd 1252 read_sd: file =
C:\cygwin\usr\local\apache\logs\httpd.pid
506 221541 [main] httpd 1252 read_sd: file =
C:\cygwin\usr\local\apache\logs\httpd.pid: len=212
267 221808 [main] httpd 1252 get_nt_attribute: file:
C:\cygwin\usr\local\apache\logs\httpd.pid 1A4, uid 1000, gid 513
187 221995 [main] httpd 1252 fhandler_disk_file::fstat: 0 = fstat (, 0x240FA24)
st_atime=3BCC0FAB st_size=0, st_mode=0x81A4, st_ino=2725588, sizeof=64
188 222183 [main] httpd 1252 _fstat: 0 = fstat (3, 240FA24)
198 222381 [main] httpd 1252 _write: write (3, 0xA024670, 5)
180 222561 [main] httpd 1252 fhandler_base::write: binary write
274 222835 [main] httpd 1252 fhandler_base::write: 5 = write (0xA024670, 5)
184 223019 [main] httpd 1252 _write: 5 = write (3, 0xA024670, 5)
181 223200 [main] httpd 1252 _close: close (3)
176 223376 [main] httpd 1252 fhandler_base::close: handle 0xD0
329 223705 [main] httpd 1252 _close: 0 = close (3)
552 224257 [main] httpd 1252 time: 1003229099 = time (6065D00C)
494 224751 [main] httpd 1252 handle_exceptions: In cygwin_except_handler exc
0xC0000005 at 0x606087BF sp 0x240F95C
186 224937 [main] httpd 1252 handle_exceptions: In cygwin_except_handler sig = 11
at 0x606087BF
180 225117 [main] httpd 1252 handle_exceptions: In cygwin_except_handler calling 0x0
180 225297 [main] httpd 1252 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
37096 262393 [main] httpd 1252 stackdump: Dumping stack trace to httpd.exe.stackdump
2758496 3020889 [main] httpd 1252 try_to_debug: debugger_command ''
579 3021468 [main] httpd 1252 signal_exit: about to call do_exit (18B00)
178 3021646 [main] httpd 1252 do_exit: do_exit (101120)
170 3021816 [main] httpd 1252 void: 0x0 = signal (20, 0x1)
169 3021985 [main] httpd 1252 void: 0x0 = signal (1, 0x1)
174 3022159 [main] httpd 1252 void: 0x0 = signal (2, 0x1)
166 3022325 [main] httpd 1252 void: 0x0 = signal (3, 0x1)
170 3022495 [main] httpd 1252 fhandler_base::close: handle 0x114
202 3022697 [main] httpd 1252 fhandler_base::close: handle 0xBC
193 3022890 [main] httpd 1252 fhandler_base::close: handle 0xEC
436 3023326 [main] httpd 1252 fhandler_base::close: handle 0x134
380 3023706 [main] httpd 1252 proc_terminate: nchildren 0, nzombies 0
389 3024095 [main] httpd 1252 proc_terminate: leaving
168 3024263 [main] httpd 1252 sigproc_terminate: entering
171 3024434 [main] httpd 1252 sigproc_terminate: done
355 3024789 [main] httpd 1252 __to_clock_t: dwHighDateTime 0, dwLowDateTime 500720
180 3024969 [main] httpd 1252 __to_clock_t: total 00000000 00000032
172 3025141 [main] httpd 1252 __to_clock_t: dwHighDateTime 0, dwLowDateTime 600864
170 3025311 [main] httpd 1252 __to_clock_t: total 00000000 0000003C
170 3025481 [main] httpd 1252 _pinfo::exit: Calling ExitProcess 101120