http://qs321.pair.com?node_id=875172


in reply to Re^2: Exec format error
in thread Exec format error

It's hard to tell without seeing the rest of the config... but maybe you also have a ScriptAlias directive set up for the directory. That would have the effect of Apache trying to execute any file in it (with the execute bit set)...

It's probably a good idea to read up on and understand the subtle differences between ScriptAlias, option ExecCGI, SetHandler and AddHandler, and then re-check your config. Also don't forget to restart apache after having made any changes (just in case you didn't...)

See also Dynamic Content with CGI for an overview, and Configuration Sections (for understanding which scope directives will apply to).

If that still doesn't help, it's probably appropriate to switch to some webserver/apache forum, as the issue isn't really related to Perl at all...