Help - Search - Member List - Calendar
Full Version: cgi problem
WorkTheWeb Forums > Webmaster Resources > Perl Beginner Help
Support our Sponsors!
Aditi Gupta
Hello Perlers,

I'm very new to CGI programming. I'm working with following:
Browser: Mozilla Firefox
Server: Apache 2.0.54
OS: Windows XP

I'm going through the following online tutorial for cgi:
http://www.cgi101.com/book/

The 1st cgi code that I wrote is as follows:

first.cgi
---------------------------------------------------------------------------------------------
#!perl/bin/perl -wT
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
print " Content-type : text/htmlnn";
print "Hello World!n";
---------------------------------------------------------------------------------------------
But when I write 'http://localhost/~P4/first.cgi' in the browser location
window (P4 is my username), it said "Internal Server Error". I'm working on
my personal computer. The tutorial says that it might happen because I
haven't changed file permissions using 'chmod 755 filename'. But there is no
chmod command in Windows XP. Also, if I don't want to change file
permission, will the code not be executed?

Please Help,
Thanks in advance for your help and time.
Regards,

Aditi

Owen Cook
On Mon, 4 Jul 2005, Aditi Gupta wrote:

QUOTE

I'm very new to CGI programming. I'm working with following:
Browser: Mozilla Firefox
Server: Apache 2.0.54
OS: Windows XP

I'm going through the following online tutorial for cgi:
http://www.cgi101.com/book/

The 1st cgi code that I wrote is as follows:

first.cgi
---------------------------------------------------------------------------------------------
#!perl/bin/perl -wT
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
print " Content-type : text/htmlnn";
print "Hello World!n";
---------------------------------------------------------------------------------------------
But when I write 'http://localhost/~P4/first.cgi' in the browser location
window (P4 is my username), it said "Internal Server Error". I'm working on
my personal computer. The tutorial says that it might happen because I
haven't changed file permissions using 'chmod 755 filename'. But there is no
chmod command in Windows XP. Also, if I don't want to change file
permission, will the code not be executed?





I would assume that your web server has a log that can be accessed.

Please check that and see what is reported there.

Do you have the #!perl/bin/perl line correctly referenced, ie, where is
your perl and then make sure that the shebang line points to the right
perl



Owen

Aditi Gupta
ya i have installed perl interpreter but the IIS option in 'add/remove'
programs is not checked and i don't have windows xp installation cd for the
time being. But i've downloaded apache, won't that serve the purpose? i
really have no idea about this, so any help would be highly appreciated.
And I have downloaded Perl MSI file from activestate and i've run simple
perl programs on the machine. Do i need to install it again and make some
changes during that?

Thanks in advance,
Regards,
aditi.

On 7/4/05, Langa F. Kentane <[Email Removed]> wrote:
QUOTE

I know this is a stupid question, but have you installed the perl
intepreter on your XP system and does IIS know that it should call perl for
the.pl ext? A good perl intepreter that will do the setup for you when you
install is activeperl. www.activestate.com <http://www.activestate.com

-------------------------
Original Message:
From: Aditi Gupta <[Email Removed]
To: Perl Beginners <[Email Removed]
Date: Monday, July 4 2005 08:09
Subject: cgi problem
Hello Perlers,

I'm very new to CGI programming. I'm working with following:
Browser: Mozilla Firefox
Server: Apache 2.0.54
OS: Windows XP

I'm going through the following online tutorial for cgi:
http://www.cgi101.com/book/

The 1st cgi code that I wrote is as follows:

first.cgi

---------------------------------------------------------------------------------------------
#!perl/bin/perl -wT
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
print " Content-type : text/htmlnn";
print "Hello World!n";

---------------------------------------------------------------------------------------------
But when I write 'http://localhost/~P4/first.cgi' in the browser location
window (P4 is my username), it said "Internal Server Error". I'm working
on
my personal computer. The tutorial says that it might happen because I
haven't changed file permissions using 'chmod 755 filename'. But there is
no
chmod command in Windows XP. Also, if I don't want to change file
permission, will the code not be executed?

Please Help,
Thanks in advance for your help and time.
Regards,

Aditi



N. Ganesh Babu
N. Ganesh Babu wrote:

QUOTE
Hai Aditi,

I have worked with Apacche, Activestateperl 5.8.7 and XP. I will give
my experience to you.

1. Install Apache
2. Install Activestateperl
3. Configure Apache to accept cgi scripts. Please read this
"http://localhost/manual/howto/cgi.html" link after installing apache.
It will show how to configure apache.  Change unix paths to windows paths.
4. Place the script in apache2/cgi-bin/
5. and execute the script by executing
http://localhost/cgi-bin/<scriptname>.cgi

Try this one. It will work, if not write back.

The only rights possible in windows are read-only and hidden. If still
it showing rights problem uncheck these two in the properties

Regards,
Ganesh


Aditi Gupta wrote:

ya i have installed perl interpreter but the IIS option in 'add/remove'
programs is not checked and i don't have windows xp installation cd for the
time being. But i've downloaded apache, won't that serve the purpose? i
really have no idea about this, so any help would be highly appreciated.
And I have downloaded Perl MSI file from activestate and i've run simple
perl programs on the machine. Do i need to install it again and make some
changes during that?

Thanks in advance,
Regards,
aditi.

On 7/4/05, Langa F. Kentane <[Email Removed]> wrote:


I know this is a stupid question, but have you installed the perl
intepreter on your XP system and does IIS know that it should call perl for
the.pl ext? A good perl intepreter that will do the setup for you when you
install is activeperl. www.activestate.com <http://www.activestate.com

-------------------------
Original Message:
From: Aditi Gupta <[Email Removed]
To: Perl Beginners <[Email Removed]
Date: Monday, July 4 2005 08:09
Subject: cgi problem
Hello Perlers,

I'm very new to CGI programming. I'm working with following:
Browser: Mozilla Firefox
Server: Apache 2.0.54
OS: Windows XP

I'm going through the following online tutorial for cgi:
http://www.cgi101.com/book/

The 1st cgi code that I wrote is as follows:

first.cgi

---------------------------------------------------------------------------------------------
#!perl/bin/perl -wT
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
print " Content-type : text/htmlnn";
print "Hello World!n";

---------------------------------------------------------------------------------------------
But when I write 'http://localhost/~P4/first.cgi' in the browser location
window (P4 is my username), it said "Internal Server Error". I'm working
on
my personal computer. The tutorial says that it might happen because I
haven't changed file permissions using 'chmod 755 filename'. But there is
no
chmod command in Windows XP. Also, if I don't want to change file
permission, will the code not be executed?

Please Help,
Thanks in advance for your help and time.
Regards,

Aditi








Aditi Gupta
Hi Ganesh,

Thanks for your time. I tried that but still its giving 'internal server
error'.
There were no unix paths in the httpd configuration file, i found windows
paths everywhere.
But at one place user directory is given as
UserDir "My Documents/My Website"

shall i comment this line? i've attached the configuration file.
please help.

Regards,
Aditi

On 7/5/05, Aditi Gupta <[Email Removed]> wrote:
QUOTE


Hi Ganesh,

Thanks for your time. I tried that but still its giving 'internal server
error'.
There were no unix paths in the httpd configuration file, i found windows
paths everywhere.
But at one place user directory is given as
UserDir "My Documents/My Website"

shall i comment this line? i've attached the configuration file.
please help.

Regards,
Aditi


On 7/4/05, N. Ganesh Babu <[Email Removed]> wrote:



N. Ganesh Babu wrote:

Hai Aditi,

I have worked with Apacche, Activestateperl 5.8.7 and XP. I will give
my experience to you.

1. Install Apache
2. Install Activestateperl
3. Configure Apache to accept cgi scripts. Please read this
"http://localhost/manual/howto/cgi.html" link after installing apache..
It will show how to configure apache. Change unix paths to windows
paths.
4. Place the script in apache2/cgi-bin/
5. and execute the script by executing
http://localhost/cgi-bin/<scriptname>.cgi

Try this one. It will work, if not write back.

The only rights possible in windows are read-only and hidden. If still
it showing rights problem uncheck these two in the properties

Regards,
Ganesh


Aditi Gupta wrote:

ya i have installed perl interpreter but the IIS option in
'add/remove'
programs is not checked and i don't have windows xp installation cd
for the
time being. But i've downloaded apache, won't that serve the purpose?
i
really have no idea about this, so any help would be highly
appreciated.
And I have downloaded Perl MSI file from activestate and i've run
simple
perl programs on the machine. Do i need to install it again and make
some
changes during that?

Thanks in advance,
Regards,
aditi.

On 7/4/05, Langa F. Kentane <[Email Removed] > wrote:


I know this is a stupid question, but have you installed the perl
intepreter on your XP system and does IIS know that it should call
perl for
the.pl ext? A good perl intepreter that will do the setup for you
when you
install is activeperl. www.activestate.com<http://www.activestate.com><http://www.activestate.com


-------------------------
Original Message:
From: Aditi Gupta <[Email Removed]
To: Perl Beginners < [Email Removed]
Date: Monday, July 4 2005 08:09
Subject: cgi problem
Hello Perlers,

I'm very new to CGI programming. I'm working with following:
Browser: Mozilla Firefox
Server: Apache 2.0.54
OS: Windows XP

I'm going through the following online tutorial for cgi:
http://www.cgi101.com/book/

The 1st cgi code that I wrote is as follows:

first.cgi

---------------------------------------------------------------------------------------------

#!perl/bin/perl -wT
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
print " Content-type : text/htmlnn";
print "Hello World!n";


---------------------------------------------------------------------------------------------
But when I write 'http://localhost/~P4/first.cgi<http://localhost/%7EP4/first.cgi>'
in the browser location
window (P4 is my username), it said "Internal Server Error". I'm
working
on
my personal computer. The tutorial says that it might happen because
I
haven't changed file permissions using 'chmod 755 filename'. But
there is
no
chmod command in Windows XP. Also, if I don't want to change file
permission, will the code not be executed?

Please Help,
Thanks in advance for your help and time.
Regards,

Aditi













PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.