Forum Moderators: phranque
We have an application written in perl, which makes use of javascript code for scripting. When I try to execute a perl program which uses a javascript code for checking the contents entered in a form I get the following error message in the apache webserver log:
Exec format error: exec of 'checkform.js'
failed
[Mon Jul 17 06:41:54 2006] [error] [client (IP address)] Premature end of script
headers: checkform.js
and also when I try to open an html file which is created by one of the perl scripts I get the following error message:
[Mon Jul 17 07:05:43 2006] [error] (13)Permission denied: exec of 'February_2004
_X11_defectdoc_sec.html' failed
[Mon Jul 17 07:05:43 2006] [error] [client (IP address)] Premature end of script
headers: February_2004_X11_defectdoc_sec.html, referer: [test17...]
nter_defects/viewdefectdocument.pl
Can anyone tell me what could be the root cause of the above problems? Thanks for your cooperation.
Regards,
Manoj
At first glance, it seems as though you may have put the JavaScript and HTML file into the executable cgi-bin directory, and by doing so, told the server to execute them. That won't work.
You may also have problems with missing MIME-type headers, or with other server response headers that your PERL script should be outputting, such as:
print ("Content-type: text/html\n");