httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zak Burke <zd...@Dartmouth.EDU>
Subject [users@httpd] mod_rewrite startup failure on PPC-binary on intel Mac
Date Mon, 01 Oct 2007 18:23:08 GMT
I'm working on a PPC build of httpd 2.2.4 on an Intel Mac. I'm
doing this because I need Oracle support built into mod_php; because 
Oracle has only released PPC libraries, I have to compile
PPC-only apps if I want to use them. I have a working httpd/php combo 
and now I'm trying to add mod_rewrite to the mix. I can get mod_rewrite 
to work if I totally disable logging at compiletime, but if logging is 
allowed httpd will not start.

Here is a bit of history: httpd compiles after configuring like this:

     $ CPPFLAGS="-arch ppc" LDFLAGS="-arch ppc" ./configure
     --build=ppc-apple-darwin8.10.2

but it won't start. The error log showed messages like this:

     [emerg] (14)Bad address: Couldn't set permissions on
     cross-process lock; check User and Group directives

The problem is a bad default AcceptMutex setting (sysvsem; pthread also 
fails; flock, fcntl and posixsem all work fine). Thanks to Vincent Bray 
to putting me on the track to figuring out that problem.

Building mod_rewrite with apxs like this:

     sudo /usr/local/apache2-ppc/bin/apxs -Wc,"-arch ppc"
     -Wl,"-arch ppc" -i -a -c mod_rewrite.c

works but gives a similar error when trying to start httpd:

     [crit] (14)Bad address: mod_rewrite: Could not set permissions
     on rewrite_log_lock; check User and Group directives

     Configuration Failed

This error comes from a block near line 4048 of mod_rewrite.c. It's in a 
double-nested ifdef-block:

     #ifndef REWRITELOG_DISABLED
     ...
     #ifdef AP_NEED_SET_MUTEX_PERMS

The second ifdef, defined in defined in os/unix/os.h, is kinda 
suspicious given the AcceptMutex issue I originally faced. I tried 
moving the AcceptMutex directive before the "LoadModule rewrite_module 
modules/mod_rewrite.so" directive, I tried all the different AcceptMutex 
options, and I tried building mod_rewrite statically into the httpd 
binary; none work.

Happily, the comments for the REWRITELOG_DISABLED constant (see line 101 
of mod_rewrite.c) note that you can totally disable logging at 
compiletime (compile with -DREWRITELOG_DISABLED), which sidesteps the 
problem by totally skipping this block. But it doesn't really solve the 
problem, and it would be kinda nice to have logging available.

Does anybody have any hints on how I might proceed?

Thanks,

zak.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message