Re: Can't load .JS file into Perl/CGI script.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CraigT wrote:

Hello,

I've built an app with Perl (5.8)/CGI, Javscript, and CSS.  Its running on a
Windows XP Home (development box) using Apache 2.   It is being handled by
mod_perl 2 with no errors.

My problem is that I can't load .JS files into Perl/CGI scripts running out
of the cgi-bin directory using the '<script SRC=' method.   I can't load a
.JS file from a supra-, the cgi-bin, or a sub- directory.  I have no problem
loading a .JS file in this way into a process executing out of the root
directory - the parent to the cgi-bin directory.   I'm thinking I have not
done something needed in the Apache HTTPD?   Can anyone help me.  Thanks in
advance.

Respectfully,
craigt
---------------- End original message. ---------------------

Your http server is probably configured to run anything in the cgi-bin directory as a CGI script. So what is probably happening is that the server is attempting to execute these js files and failing. If that is the case, you should see log entries in the error log regarding these failures.

You need to serve these files out of a different directory and you also need to make sure that the mime type for them is properly configured. This is because the server must serve them and not execute them and the browser should be given the correct content type when the file is served.

Dragon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux