also @ TechSpot: Windows logo to get a Metro makeover in Windows 8
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > TechSpot Community > General Discussion

Download Now:

Apache Server for Windows XP will not ouput Perl scripts properly

Reply
Thread Tools Search this Thread
  #1  
Old 05-14-2002
Rick's Avatar
TechSpot Special Forces
 
Location: Los Angeles, CA
Member since: Feb 2002, 5,600 posts
Apache Server for Windows XP will not ouput Perl scripts properly

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:

Quote:
#!perl
print "Content-type: text/plain\n\n";
print "Hello?";
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?
Attached Files
File Type: txt httpd.txt (36.1 KB, 2 views)
  #2  
Old 05-15-2002
Rick's Avatar
TechSpot Special Forces
 
Location: Los Angeles, CA
Member since: Feb 2002, 5,600 posts
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  
Old 05-15-2002
Didou's Avatar
Bowtie extraordinair!
 
Location: Brussels, Belgium
Member since: Feb 2002, 5,895 posts
System specs
Quote:
Originally posted by Rick
text/plain does not work properly for Internet Explorer because MS is a bunch of monopolistic imperialists...
Preach my man Rickeh, preach the good words !!!
  #4  
Old 05-15-2002
Rick's Avatar
TechSpot Special Forces
 
Location: Los Angeles, CA
Member since: Feb 2002, 5,600 posts
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  
Old 05-15-2002
Didou's Avatar
Bowtie extraordinair!
 
Location: Brussels, Belgium
Member since: Feb 2002, 5,895 posts
System specs
You should add this line in the httpd.conf file

Quote:
AddHandler cgi-script .cgi
Reply

Similar Topics
Topic Replies Forum
Windows server 2003 logon scripts 0 Windows OS
Apache server HTTP 403 error 8 Virus and Malware Removal
apache server 1 Storage and Networking
Apache Server: Advice? 2 Storage and Networking
Need help with a apache server(With PHP) 1 Software Apps

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 02:28 PM.