View Full Version : CGI Blank Screen
Kyderoy
08-03-2006, 12:28 AM
I am not a coder but I am trying to setup a web site that require Perl. The site is installed but when ever one of the cgi pages is called I get a blank screen.
I am running IIS on windows server 2003.
KevinADC
08-03-2006, 04:50 AM
Can you post a small sample script you are trying to produces a blank screen? Has the server been setup to run scripts?
Kyderoy
08-03-2006, 04:23 PM
Here is the sample code.
c:\perl\bin\perl.exe
# ^^^ this must be the first line of the script! ^^^
# start code
use strict;
use CGI;
my $q = new CGI;
# print header and start the markup output
print $q->header( "text/html" ),$q->start_html( "hello from perl cgi!" );
print $q->h2("hello dave...");
print $q->end_html;
# end code
KevinADC
08-03-2006, 05:15 PM
The problem appears to be the very first line:
c:\perl\bin\perl.exe
this is a special line and needs to start with '#!', so try this and see if it produces output:
#!c:\perl\bin\perl.exe
# ^^^ this must be the first line of the script! ^^^
# start code
use strict;
use CGI;
my $q = new CGI;
# print header and start the markup output
print $q->header( "text/html" ),$q->start_html( "hello from perl cgi!" );
print $q->h2("hello dave...");
print $q->end_html;
# end code
Kyderoy
08-03-2006, 05:54 PM
Still getting a blank screen
I will send you the url in a PM
KevinADC
08-03-2006, 06:03 PM
>>Here is the url to my test script
Most servers are setup to run scripts from a folder named cgi-bin but some servers allow you to run scripts from other folders or all folders. It appears your server is not setup to run scripts, or you need to put them in the cgi-bin folder if there is one.
Kyderoy
08-03-2006, 06:06 PM
Hmmm.. I don't see a Cgi-Bin folder so what would be my next step?
vBulletin® v3.8.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.