Linux – Can’t restart the httpd service

apache-2.2httpdlinuxPHP

I just made a change to my PHP.ini file. (my Linux dist is CentOS). I figured I need to restart apache for that to take effect so I issued the command:

service httpd restart

When doing that I get this error.

Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 196 of /etc/httpd/conf/httpd.conf: 
Cannot load     
/etc/httpd/modules/mod_file_cache.so into server: 
/etc/httpd/modules/mod_file_cache.so: 
cannot open shared object file: No such file or directory

I'm not too well versed in Linux so I'm not sure what to do next.

Best Answer

From the comment you posted it appears that Apache can't load the mod_file_cache.so module that the conf is telling it to import. As far as I can recall certain editions of RHEL/CentOS don't have this included by default. Try commenting it with a # at the beginning of the line. Otherwise try rebuilding Apache with the module.