On Thu, 14 Feb 2002, Bill Stoddard wrote:

> From testing on Windows, I am +1 for beta.

First I noticed that the KEYS file is missing from the tar file.
Second perchild doesn't compile, but see attached mpm_perchild.patch for the fix ;)
It basically does a int num_sockets and add the POD definition and static.

It doesn't work then though.... at least it works unless I specify the
following things:
8<----------------------------
ChildperUserID 33 33 1
ChildperUserID 1004 1004 2
---------------------------->8
Numberic... otherwise it will b*tch

And per vhost:
8<--------------------
AssignUserID 1004 1004
-------------------->8
One vhost is using 1004 (wwwics) user, the others use the 33 (www-data) user which is 
the default.

It does start up nicely and I think it's accepting the connection at the
right client, this shows up as 'top' shows the process taking the rest of
the cputime and it does have the correct user I picked for that vhost.
But where/what it's cycling at, dunno yet ;)

Also a nice error seen in my logs while fooling around with the above settings:
[Thu Feb 14 14:39:57 2002] [alert] (2)No such file or directory: getpwuid: couldn't 
determine user name from uid 4294967295, you probably need to modify the User directive
Aka uid == 0xFFFFFFFF == -1 (32bits).

Firing up my apache now makes:
 1x apache2 running as root
22x   ""       ""   "" www-data (uid=33)
14x   ""       ""   "" wwwics (uid=1004)

www-data is also the user used in the "User" option.

Perchild config:

<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>

Running it without the AssignUserID and ChildperUserID settings gives me
38x apache2 running as www-data ;)

The php/cgi-script thing was caused because of a missing mod_cgid by the way ;)

Greets,
 Jeroen
diff -u -r -N httpd-2.0.32/server/mpm/perchild/mpm.h 
../2.0.32-perchild/build-tree/httpd-2.0.32/server/mpm/perchild/mpm.h
--- httpd-2.0.32/server/mpm/perchild/mpm.h      Wed Dec 19 18:50:38 2001
+++ ../2.0.32-perchild/build-tree/httpd-2.0.32/server/mpm/perchild/mpm.h        Thu 
+Feb 14 13:43:07 2002
@@ -77,6 +77,7 @@
 #define AP_MPM_WANT_SET_COREDUMPDIR
 #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH

+#define AP_MPM_USES_POD 1
 #define MPM_SYNC_CHILD_TABLE()
 #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
 #define MPM_NOTE_CHILD_KILLED(i) (MPM_CHILD_PID(i) = 0)
diff -u -r -N httpd-2.0.32/server/mpm/perchild/perchild.c 
../2.0.32-perchild/build-tree/httpd-2.0.32/server/mpm/perchild/perchild.c
--- httpd-2.0.32/server/mpm/perchild/perchild.c Tue Feb  5 23:18:49 2002
+++ ../2.0.32-perchild/build-tree/httpd-2.0.32/server/mpm/perchild/perchild.c   Thu 
+Feb 14 13:42:30 2002
@@ -78,7 +78,7 @@
 #endif

 #define CORE_PRIVATE
-
+
 #include "ap_config.h"
 #include "httpd.h"
 #include "http_main.h"
@@ -107,6 +107,9 @@
 #include <sys/processor.h> /* for bindprocessor() */
 #endif

+#include "ap_mmn.h"
+
+
 /*
  * Define some magic numbers that we use for the state of the incomming
  * request. These must be < 0 so they don't collide with a file descriptor.
@@ -175,6 +178,8 @@
 static int num_listenfds = 0;
 static apr_socket_t **listenfds;
 static jmp_buf jmpbuffer;
+static ap_pod_t *pod;
+

 struct child_info_t {
     uid_t uid;
@@ -1429,6 +1434,7 @@
 static int perchild_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, 
server_rec *s)
 {
     apr_status_t rv;
+    int num_listensocks;

     pconf = p;
     ap_server_conf = s;

Reply via email to