I'm not sure why, but when I try to start the httpd service, it will not start.

Server config:

OS: CentOS 5.10
PHP: 5.5.7
Apache: 2.2.3
  1. I built mod_fcgid from source, put it into the /etc/httpd/modules directory.

  2. I appended LoadModule fcgid_module modules/mod_fcgid.so to the list of modules

  3. I commented out LoadModule cgi_module modules/mod_cgi.so since I will not need it.

  4. I created a wrapper script for php and placed it into /var/www/cgi-bin:

  5. I created a handler for PHP that points to the wrapper.

  6. Then I try to start the httpd service

The following is the error that I get in /var/log/httpd/error_log:

[Mon Dec 16 12:18:26 2013] [notice] SELinux policy enabled; httpd running as context user_u:system_r:httpd_t:s0
[Mon Dec 16 12:18:26 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Dec 16 12:18:26 2013] [notice] SSL FIPS mode disabled
[Mon Dec 16 12:18:26 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Dec 16 12:18:26 2013] [notice] Digest: done
[Mon Dec 16 12:18:26 2013] [emerg] (17)File exists: mod_fcgid: Can't create shared memory for size 1200712 bytes

I'm not sure if this is a permissions issue, or something with SELinux perhaps - or maybe suEXEC?

I would appreciate any guidance, since I'm not even sure where to start searching.

  • Is the module being loaded twice somehow?
    – Atle
    Dec 16, 2013 at 21:31

1 Answer 1


I faced the same issue and fixed by setting FcgidIPCDir :

LoadModule fcgid_module modules/mod_fcgid.so

FcgidIPCDir /var/run/mod_fcgid
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

and make sure you create that directory:

mkdir -p /var/run/mod_fcgid

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .