TechSpot

Apache Server for Windows XP will not ouput Perl scripts properly

By Rick
May 14, 2002
Post New Reply
  1. I wasn't sure where to stick this thread, so when in doubt...

    I've setup the newest version of Apache Server and newest version of Active Perl on a Windows XP computer.

    CGI/Perl scripts execute fine via the server, but it refuses to display the output in the browser. Instead, Apache insists on delivering the output as a downloadable file.

    Now, the neat thing is, the file contains the exact output that would have been displayed in the browser (if it were working correctly). So, a perl script like this:

    Gives me a downloadable text file that says "Hello?". The scripts do indeed work properly, their output is just getting downloaded instead of displayed.

    I've included my config file so any of your who are knowledgable about this can look at it and tell me what I'm doing wrong.

    Are there any suggestions to fix this?
     
  2. Rick

    Rick TechSpot Staff Topic Starter Posts: 6,305   +52 Staff Member

    I've got it.. I'm so silly!

    I used the text/plain header instead of text/html in my script. text/plain does not work properly for Internet Explorer because MS is a bunch of monopolistic imperialists...
     
  3. Didou

    Didou Bowtie extraordinair! Posts: 5,899

    Preach my man Rickeh, preach the good words !!! :D
     
  4. Rick

    Rick TechSpot Staff Topic Starter Posts: 6,305   +52 Staff Member

    I do have another problem, however. It seems that a perl script with the .pl extension works well.. However, with the CGI description, does not. If I add the .cgi extension, it never completes the script (As in the browser just sits there waiting for it to respond)

    Ideas?
     
  5. Didou

    Didou Bowtie extraordinair! Posts: 5,899

    You should add this line in the httpd.conf file

     


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.