Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Exec format error

by anu_1 (Acolyte)
on Dec 03, 2010 at 10:19 UTC ( #875133=note: print w/replies, xml ) Need Help??


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

I have updated (AddHandler) the Apache httpd.conf to execute only .pl
<Directory "mydir/tools/cgi-bin"> AllowOverride AuthConfig Options FollowSymLinks Order allow,deny Allow from all AddHandler cgi-script .pl </Directory>
But still getting the same error. I am new to Apache configuration ...anything else needs to be done.. Thanks again...

Replies are listed 'Best First'.
Re^3: Exec format error
by marto (Cardinal) on Dec 03, 2010 at 10:35 UTC

    Please read the error message, your target file as a .html extension. Looks like your webserver is trying to execute an html file. Read the apache documentation for more information.

Re^3: Exec format error
by Anonymous Monk on Dec 03, 2010 at 10:46 UTC
    <Directory "mydir/tools/cgi-bin"> ^
    I think the directory specification here needs to be a full (absolute) path in the filesystem. See <Directory>.
      sorry printing mistake...getting the same error with the following configuration
      <Directory "/mydir/tools/cgi-bin"> AddHandler cgi-script .pl AllowOverride AuthConfig Options FollowSymLinks Order allow,deny Allow from all </Directory>
Re^3: Exec format error
by Anonymous Monk on Dec 03, 2010 at 13:10 UTC
    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...

      Thanks for your help...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://875133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2022-05-20 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (75 votes). Check out past polls.

    Notices?