The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help for a perl script - writing to a data file meghana Shell Programming and Scripting 2 02-04-2008 05:05 PM
Perl Unix Script Writing Dinkster UNIX for Dummies Questions & Answers 1 02-01-2008 04:09 PM
Reading and Writing from Excel using Unix scripting AshishK UNIX and Linux Applications 3 11-09-2007 02:49 AM
Perl Scripting vaibhav Shell Programming and Scripting 10 03-27-2007 05:32 AM
Writing perl module jo_aze Shell Programming and Scripting 4 08-06-2003 11:10 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-23-2007
alma alma is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 10
Writing CGI scripting using perl

Hi All,

I am trying to do the following thing.
I am entering name & email id & then in action i am calling a .cgi program that sends a email to the email id entered.
I am facing a small problem, once i have entered the details , its printing the contents of .cgi file in browser. there is a subroutine in program which prints the thank you note. it should give me that.

can anyone let me know where i went wrong.?


Thanks in advance.

Alma
  #2 (permalink)  
Old 04-23-2007
srinivasan_85 srinivasan_85 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 28
Post HTTP Server status

As far as i know, this happens only under two situations:
- http server may not be running.
- cgi is not supported (i dont think this is common)

Thanks
Srini
  #3 (permalink)  
Old 04-23-2007
alma alma is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 10
I have restart my apache server .

I could find these enteries in the
#set Apache::PerlRun Mode for /cgi-perl Alias
<Location "/cgi-perl/*.pl">
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options -Indexes ExecCGI
PerlSendHeader On
</Location>


how can i know the cgi is not supported ?

Thanks
Alma
  #4 (permalink)  
Old 04-23-2007
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
For mod_perl, you have set the script executable, right? Also check Apache error log for more hints.
  #5 (permalink)  
Old 04-23-2007
alma alma is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 10
CGI Script - Not getting form value

My code is a.html
<html>
<head>
<title></title>
<body>
<form name=name form method=post action=http://localhost/cgi-bin/b.cgi>
enter your name:<input name=name type=text><br>
<input type=submit>
</form>
</body>
</html>

b.cgi
#!/perl/bin/perl5.6.1.exe
use strict;
use CGI qw(:standard);
my $name=param("name");
print "Content-Type:text/html\n\n";
print $name;

But i am not getting the value in it.

Thanks Alma
  #6 (permalink)  
Old 04-23-2007
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
Server is displaying source code because either there are problems with your mod_perl configuration, or your script is not properly installed (without +x chmod, lack of access permission, etc.), etc.

And your Apache configuration suggests you are not running Apache CGI (at least that's not what you quoted). You are running mod_perl.

Try changing the extension from .cgi to .pl and see if it helps. And did you actually give an executable chmod?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:47 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0