# apache-2.2.4 + mod_fcgid = disaster -- NOT RESOLVED

## Fred Krogh

In my apache error_log file I'm getting *Quote:*   

>  [emerg] (2)No such file or directory: mod_fcgid: Can't create share memory for size %zu byte

   I know mod_fcigd is loaded because if I don't load it, the startup complains about FastCgiAuthenticaror.  Apache appears to start, but nothing works, and /etc/init.d/apache2 stop, says there is nothing to stop.  I've tried many times doing various /etc/init.d/apache2 zap; killall -v apache2; and /etc/init.d/apache2 start.  It seems that although there is an apache2 running, it doesn't seem to be there.  I'm back to apache-2.0.59-r2, but I'd be interested if anyone has some ideas.  I am on an Opteron system, and am running virtual hosts.  Thanks,

FredLast edited by Fred Krogh on Tue May 22, 2007 10:56 pm; edited 2 times in total

----------

## neysx

You need to add SharememPath to your fcgid config:

```
<IfModule mod_fcgid.c>

 SharememPath /var/run/fcgid_shm

 IdleTimeout 40

 IdleScanInterval 30

 BusyTimeout 240

 BusyScanInterval 80

 ErrorScanInterval 5

 ProcessLifeTime 200

 MaxRequestsPerProcess 20

 SocketPath /var/run

 SpawnScoreUpLimit 20

 SpawnScore 2

 TerminationScore 1

 MaxProcessCount 4

 DefaultMaxClassProcessCount 4

 DefaultInitEnv GORG_CONF /etc/gorg/gorg.conf.mygentoo

 IPCConnectTimeout 10

 IPCCommTimeout 90

 OutputBufferSize 0

</IfModule>

```

hth

----------

## Fred Krogh

I'm missing something here.  The only thing I see that looks like "fcgid config" is 20_mod_fcgid.conf which seems to have copies in several places that contain

```
<IfDefine FCGID>

    <IfModule !mod_fcgid.c>

        LoadModule fcgid_module modules/mod_fcgid.so

    </IfModule>

    <IfModule mod_fcgid.c>

        AddHandler fcgid-script .fcg

    </IfModule>

</IfDefine>

```

This seems so different from what you posted that I must be in the wrong place.  I could use an explicit pointer to the file in question.  Also the only thing fastcgi related in /var/run is a directrory fastcgi which has a subdirectory dynamic, which is empty.   Thanks,

Fred

----------

## neysx

Looks you have never configured mod_fcgid at all  :Smile: 

These config directives are in your apache/vhost config.

Check http://fastcgi.coremail.cn/doc.htm

Hth

----------

## Fred Krogh

Thanks for the instantaneous response!  Note that my configuration has been working in apache-2.0.59-r2.  Is what you suggested supposed to go in /etc/apache2/vhost.d/00_default_vhost.conf?  This is the only "vhost config" file I know of, and it seems like a strange place to put this stuff.  Thanks,

Fred

----------

## neysx

You can configure it in any config file that is in use. You can add it to http.conf if you like. You can use a separate .conf file and include it from http.conf which is cleaner imo.

Hth

----------

## Fred Krogh

The natural place would seem to be the 20_mod_fcgid.conf file that I listed above.  But based on  trying different things, I'm pretty sure that in this file, the code took the branch defined by <IfModule !mod_fcgid.c>, and in your code I would need the branch <IfModule mod_fcgid.c>.  Whatever the case it seems that the file 20_mod_fcgid should be updated in the distribution.  I don't like to take my site down during the week, but next weekent I can try including what you suggested in 20_mod_fcgid.conf no matter which branch the code takes.  Thanks,

Fred

----------

## Fred Krogh

With the change suggested (put in 20_mod_fcgid.conf) and re-emerging mod_fcgid after emerging the latest apache and all works!  Perhaps this could be added to the 20_mod_fcgid.conf that is part of the package??  Many thanks,

Fred

----------

## Fred Krogh

I spoke too soon.  My site uses both cookies and authentication.  The cookies worked, but I just discovered that FastCgiAuthenticator does not work.  I'd appreciate hearing from others who have or have not got this working.  I'm back with apache-2.0.59-r2 and mod_fastcgi.  I  had mod_fcgid working here as well, but I've had enough of this for awhile and I'm not absolutely sure the FastCgiAuthenticator was working with it!  Thanks,

Fred

----------

## Fred Krogh

Just tried to install mod-fcgid-r1 and got *Quote:*   

> Makefile:13: /usr/local/apache2/build/special.mk: No such file or directory

 I've been burned too much  with the latest apache and fastcgi to want to track this down, but others have reported this problem on other linux distributions so the problem is probably upstream.

Fred

----------

