FP & perl

L

Lew

Can someone point me to some examples/samples of using perl scripts with FP.
Interaction with mySQL would also be helpful.
-Lew
 
R

Ronx

That is a very broad subject.
Every page on my site www.rxs-enterprises.com/ was created in FrontPage,
and interacts with a Perl script (hidden hit logger).
Forms www.rxs-enterprises.com/rxsents/formmail.html use Perl as the form
handler (use Test#1 as the subject if you try it)
and www.rxs-enterprises.com/tabnofrm/ uses .csv text files as a database.

These examples probably tell you nothing, except Perl can be used with
FrontPage created pages. What explicitly do you need? (I have never
worked with mySQL, so can't help there.)
 
L

Lew

I'm interested in perl because that's the cgi lang supported by my site's
host. Nothing explicit, yet.
-Lew

What explicitly do you need? (I have never
 
L

Lew

I'd be happy enough to learn how to create a helloworld perl script, load it
to my host's server, and execute it via a button click somewhere on my site.
I've no idea how even to begin.
-Lew
 
R

Ronx

You need some information from the host:
Path to the Perl executable (e.g. /usr/bin/perl is typical on a Linux
machine.)
Location of your cgi-bin (this may not be within your web site)
The extension to be used for the script, usually .pl but some hosts insist
on .cgi

the "hello World" script would look like this:

#!/usr/bin/perl -w
# above line must be first line and tells server where to find Perl.
use CGI;
my $form = new CGI;
#makes life easy for developer, but CGI library can be a resource hog.

#print HTTP headers
print $form->header( -type=>"text/html; charset=ISO-8859-1");

#print HTML page
print qq~
<html>
<head>
<title>Hello World</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>
~;
# finished
exit;

Create this in notepad, save as hello.pl
Assuming a Unix server, FTP it (do NOT publish with FrontPage) to the
cgi-bin on your server.
When uploaded, in the FTP client CHMOD the file to 755. This sets
permissions on the file to Owner: Read, Write, Execute; Group: Read,
Execute; Others: Read, Execute.

You can download a Windows version of Perl from
http://www.activestate.com/Products/ActivePerl/ , but you must be running a
web-server to use it with web pages.
 
L

Lew

Ron:
Thanks so much for helping.
OK, I've created the script, but when I try to upload it to the
cgi-local directory on my site via CuteFTP, I get a permission denied error.
This occurs when I'm logged in as the admin user, so I don't know what's
going on. I've contacted my host, but is it possible that I'm missing
something?
-Lew
 
S

Stefan B Rusynko

Contact your host to set the permission correctly for the cgi-bin or to inform you of it's real location
- if the host has done it correctly your actual cgi-bin folder is above the root level of your web for security reasons) and what
you are "seeing" in your web (www or html or root folder) is a virtual folder

PS
In FP in your local web create a cgi-bin folder and convert it to a subweb, so that FP leaves your online cgi-bin folder alone
(publish w/o including subwebs)




| Ron:
| Thanks so much for helping.
| OK, I've created the script, but when I try to upload it to the
| cgi-local directory on my site via CuteFTP, I get a permission denied error.
| This occurs when I'm logged in as the admin user, so I don't know what's
| going on. I've contacted my host, but is it possible that I'm missing
| something?
| -Lew
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top