Setup: Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.7 with Suhosin-Patch configured
/etc/debian_version shows "squeeze/sid".
Copied a javascript ts_picker.js file to /usr/lib/cgi-bin (the configured CGI directory in apache conf files). All my PHP programs are in the same directory as well.
Tried running a simple PHP script which refers the ts_picker.js file within a <script src> tag in the <HEAD>.
But no javascript works. Apache error.log shows:
[Wed Apr 13 19:05:41 2011] [error] [client 10.0.0.37] (8)Exec format error: exec of '/usr/lib/cgi-bin/ts_picker.js' failed, referer: http://10.0.27.200/cgi-bin/js.php
[Wed Apr 13 19:05:41 2011] [error] [client 10.0.0.37] Premature end of script headers: ts_picker.js, referer: http://10.0.27.200/cgi-bin/js.php
Tried checking for permissions on the .js: they are 755, just as with all my PHP scripts.
Tried grepping 'javascript' and 'js' recursively under /etc/apache2 and found nothing except a DEFLATE entry:
/etc/apache2/mods-available/deflate.conf: # AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
/etc/apache2/mods-enabled/deflate.conf: # AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
Additionally, if I open the source of the PHP's HTML output on the browser and if I click on the ts_picker.js link there, it shows a 500 Internal error.
I am really stuck at this point and unable to do much. Any help is much appreciated. Thanks in advance.