Re: CGI for collecting phone numbers
- From: Brian Wakem <no@xxxxxxxxx>
- Date: Sat, 10 Jun 2006 16:14:50 +0100
ferreira@xxxxxxx wrote:
Please don't think that I am asking some one to do this for me! I have
spent hours trying to figure out why this simple script won't work.
This is what I have:
The html file:
<FORM ACTION="/sms.pl" METHOD="POST">Cell Number: <INPUT TYPE="text"
NAME="phone"><input type="submit" name="submitButtonName" border="0">
</FORM>
The sms.pl file:
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
my $file = '/users/web/king/web/sms.txt';
open (FILE, ">>" . $file) or die "cannot open file for appending: $!";
flock (FILE, 2) or die "cannot lock file exclusively: $!";
print "Content-type: text/html\n\n";
print FILE $phone . "\n";
close (FILE) or die "cannot close file: $!";
And a sms.txt file
All of the files are in the same place on the server
The is the error log message:
access:
c-68-35-76-89.hsd1.nm.comcast.net - - [09/Jun/2006:17:28:30 +0000]
"POST /sms.pl HTTP/1.1" 500 -
It is unlikely your webserver is configured to execute files in your
document root. You may have to move it into /cgi-bin or similar, and make
sure it is executable by the webserver (permissions).
--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
.
- Follow-Ups:
- Re: CGI for collecting phone numbers
- From: ferreira@xxxxxxx
- Re: CGI for collecting phone numbers
- References:
- CGI for collecting phone numbers
- From: ferreira@xxxxxxx
- Re: CGI for collecting phone numbers
- From: Bart Van der Donck
- Re: CGI for collecting phone numbers
- From: ferreira@xxxxxxx
- Re: CGI for collecting phone numbers
- From: Paul Lalli
- Re: CGI for collecting phone numbers
- From: ferreira@xxxxxxx
- CGI for collecting phone numbers
- Prev by Date: Re: CGI for collecting phone numbers
- Next by Date: [Announce] New custom version of SOAP::WSDL released
- Previous by thread: Re: CGI for collecting phone numbers
- Next by thread: Re: CGI for collecting phone numbers
- Index(es):
Relevant Pages
|