Home > Archive > PERL CGI Beginners > March 2005 > Perl Apache Configuration
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Perl Apache Configuration
|
|
| Warren Gwartney 2005-03-27, 3:55 am |
| Perhaps someone will understand what is happening here. I've been trying
to configure perl and apache on a redhat8 server with virtual hosts. Perl
works well on the system and is executing cgi-bin scripts as well, but the
output HTML is not being rendered by the browser on my scripts. I know
you're thinking, you're not sending the headers dummy! But please just
take a look: http://www.realtordb.com/cgi-bin/hello2.pl . Most of the
scripts I'm working with are tested and tried but I get the same text only
output for all of them. Any ideas, suggestions, answers would be so
greatly appreciated. Surely I'm not the only one out there who has had
this problem.
The script is your basic html output.
#!/usr/local/bin/perl
# hello.cgi - My first CGI program
print "Content-Type: text/html\n\n";
print "<html> <head>\n";
print "<title>Hello, world!</title>";
print "</head>\n";
print "<body>\n";
print "<h1>Hello, world!</h1>\n";
print "</body> </html>\n";
| |
| Greg Jetter 2005-03-27, 8:55 pm |
| On Sunday March 27 2005 4:25 am, Warren Gwartney wrote:
> Perhaps someone will understand what is happening here. I've been trying
> to configure perl and apache on a redhat8 server with virtual hosts. Perl
> works well on the system and is executing cgi-bin scripts as well, but the
> output HTML is not being rendered by the browser on my scripts. I know
> you're thinking, you're not sending the headers dummy! But please just
> take a look: http://www.realtordb.com/cgi-bin/hello2.pl . Most of the
> scripts I'm working with are tested and tried but I get the same text only
> output for all of them. Any ideas, suggestions, answers would be so
> greatly appreciated. Surely I'm not the only one out there who has had
> this problem.
>
> The script is your basic html output.
> #!/usr/local/bin/perl
> # hello.cgi - My first CGI program
> print "Content-Type: text/html\n\n";
> print "<html> <head>\n";
> print "<title>Hello, world!</title>";
> print "</head>\n";
> print "<body>\n";
> print "<h1>Hello, world!</h1>\n";
> print "</body> </html>\n";
works fine in my browser , i see hello world
Greg
| |
| Gavin Henry 2005-03-27, 8:55 pm |
| On Sunday 27 Mar 2005 05:25, Warren Gwartney wrote:
> Perhaps someone will understand what is happening here. I've been trying
> to configure perl and apache on a redhat8 server with virtual hosts. Perl
> works well on the system and is executing cgi-bin scripts as well, but the
> output HTML is not being rendered by the browser on my scripts. I know
> you're thinking, you're not sending the headers dummy! But please just
> take a look: http://www.realtordb.com/cgi-bin/hello2.pl . Most of the
> scripts I'm working with are tested and tried but I get the same text only
> output for all of them. Any ideas, suggestions, answers would be so
> greatly appreciated. Surely I'm not the only one out there who has had
> this problem.
>
> The script is your basic html output.
> #!/usr/local/bin/perl
> # hello.cgi - My first CGI program
> print "Content-Type: text/html\n\n";
> print "<html> <head>\n";
> print "<title>Hello, world!</title>";
> print "</head>\n";
> print "<body>\n";
> print "<h1>Hello, world!</h1>\n";
> print "</body> </html>\n";
Try:
Content-type
not:
Content-Type
--
Just getting into the best language ever...
Fancy a yourname@perl.me.uk or something
on http://www.perl.me.uk Just ask!!!
| |
| Lawrence Statton 2005-03-28, 3:55 pm |
| >
> Try:
>
> Content-type
>
> not:
>
> Content-Type
>
Red herring
Content-Type is as good as CONTENT-TYPE is as good as cOnTeNt-TYpe ...
See RFCs 2616, 1945, 822
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - lawrenabae@abaluon.abaom s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
| |
| kevindotcar 2005-03-28, 3:55 pm |
| Warren Gwartney wrote:
[---]
>
> The script is your basic html output.
> #!/usr/local/bin/perl
> # hello.cgi - My first CGI program
> print "Content-Type: text/html\n\n";
> print "<html> <head>\n";
> print "<title>Hello, world!</title>";
> print "</head>\n";
> print "<body>\n";
> print "<h1>Hello, world!</h1>\n";
> print "</body> </html>\n";
Good looking script you have there... Have you looked at;
1. your apache ScriptAlias setup?
2. Do you have "AddHandler cgi-script pl" un-commented?
Just some ideas,
kevindot
|
|
|
|
|