Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with perl/cgi and a dynamic html page

Status
Not open for further replies.

chs22

MIS
May 19, 2003
5
0
0
US
I'm new at creating scripts so I've tried some 3rd party programs to try to get my form to work. I want people to be able goto , check off some of the options, input their info, click the submit button and have a "dynamic" page which updates each time a visitor adds their information. I have a .pl script which I created with Perl Builder 2.0 and it seems like it "sort of" works while I'm running that program, but when I upload the 2 files (trading.htm and trading.pl) I get an error message when I click the submit button. Any info would be greatly appreciated. I did chmod 755 on the .pl file, so I don't think it's a permission issue. Anything you can do to help me out would be really great. Thanks in advance!

Also: Just wanted to add -- that if it's possible to create database entries as well when a visitor enters his/her information that would be great --

Caleb
 
That's the message I get when there's an error in the .pl file that PERL can't interpret. It could be a missing ; or { or anything. I'd have to see the script to say any more.
 
So you've managed tro get your script to run on your machine, but it fails on a web server. You've already cheched permissions...

OK, I've got a couple things you can try:

-Make sure that you upload the perl in ASCII, not binary.

-If you developed the perl on a windows box, you may have the wrong shebang line, (first line of your script). Check if your web server is a Linux/Unix box. If so, try using:

#!/usr/bin/perl

as your shebang line. If this doesn't work, ask your webhost for the location of the perl executable (make sure there is one!). If it's your own webserver and it's got perl on it, at the command-line do:

which perl
or
locate perl

to find the location of the perl executable and put that path on the shebang line.

Lastly, if your perl uses any modules, make sure those modules are installed on the webserver.

As for database, perl can add records into a database (check out the DBI, or DB_MYSQL modules, for example. I've done database CGI with MySQL and Perl pretty easily. Look into it.

Good luck. If you can't get it going, try to give more clues...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top