Hi,

I have been googling around for the cgi module (mod_cgi) for Apache2 because my cgi-scripts .pl are not executing on browser and instead of getting executed it wants to "save or open with"

It gave an errormessage

Warning: no MPM found. Some modules are dependant on the type of MPM.
Module "cgi" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Warning: no MPM found. Some modules are dependant on the type of MPM.
Starting httpd2 (/usr/sbin/httpd2-worker) /etc/init.d/apache2: line 120: eval: -f: invalid option
eval: usage: eval [arg ...]

I checked the APACHE MODULES setting in /etc/sysconfig/apache2 , "cgi" is listed there.

I enabled cgi in httpd.conf file

<Directory "/srv/www/cgi-bin/">
AllowOverride None
Options FollowSymLinks +ExecCGI -Includes
AddHandler cgi-script .pl
Order allow,deny
Allow from all
</Directory>

Any help would be greatly appreciated.

Thanks.

Recommended Answers

All 3 Replies

Hi, have you tried to enable the module? You can try with a2enmod:

sudo a2enmod cgi

If you remove the last argument then you get a list of the available modules. Then reload the server:

sudo service apache2 reload

Regarding the warning check with:

apache2 -V

or with httpd -V the command will list some information about the Apache configuration, try also with -l to get the modules included when the server was compiled.

These are perl scripts, right? Is the first line something like this?

#! /usr/bin/perl

If it is, then then script should automatically invoke perl. If not, then you need to edit the script accordingly.

Thank you for replying , below are the o/ps for given commands
1) a2enmod cgi

"cgi" already present"

2) service apache2 reload

*Warning: no MPM found. Some modules are dependant on the type of MPM.
Module "cgi" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Warning: no MPM found. Some modules are dependant on the type of MPM.
Warning: no MPM found. Some modules are dependant on the type of MPM.
cat: /var/run/httpd2.pid: No such file or directory
Reload httpd2 (graceful restart)

/etc/init.d/apache2: line 299: eval: -f: invalid option
eval: usage: eval [arg ...]

The command line was:
-f /etc/apache2/httpd.conf
*

I am starting it using the command

./apachectl start --> Is this not a correct way to start apache2 server , because if i do "service apache2 start" its giving an error "cgi-module is not installed ignoring"

These are the perl scripts the first line is same as you typed .
#! /usr/bin/perl

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.