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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My search.pl script doesn't run...

Status
Not open for further replies.

eekthecat

Programmer
Nov 13, 2000
45
US
Hy,

I think i've done something wrong when I installed Perl on my machine. I'm testing my website local by using a personal webserver. To use CGI scripts i've installed activePerl. When I click on a script (i've regestered .pl and .cgi files) it excecutes in a window. It isn't readable because it's on screen to short.

When I try to execute the file search.pl on the command line it does noting but saying it doesn't c...

My Perl is installed in c:\Perl

There is nothing said about it in the autoexec.bat

My .pl file is in c:\webshare

Perl isn't recognised at the command line because when i try it by typing:

perl search.pl

it does nothing but saying it doesn't recognise the file.

I'm prety much for sure I've got to register the Perl executer in the autoexec.bat

When I type

Perl search.pl

at the command line and it works, does it also work to post a form to the search.pl file on my webserver?

It's a long an unstructured story but I hope someone can help me...!

Eek
 
Try this,

Find the perl.exe file, probably in c:\perl\bin\ or whatever, and add this to the path line of your Autoexec.bat file. Just add a ; and c:\path\to\perl, re-boot your machine, and it should work. To test it, go to a command prompt and type perl -v, and you should get the version information. If this works, your script should run. Also, I don't know about windows, you may have to have a line similar to

#!/path/to/perl
as the first line of your file.

Good Luck! As always, I hope that helped!

Disclaimer:
Beware: Studies have shown that research causes cancer in lab rats.
 
On windows you don't need the
#!/perl/path
line.
You do need the perl executable in your path.

> It isn't readable because it's on screen to short.
see thread219-9037

>does it also work to post a form to the search.pl file on my webserver?
sorry but i don't understand what you mean. could you explain further ?

ps. I would recommend that you develop and test on your target platform ( if possible ). any extra effort this involves outweighs ( in my opinion ) having to work out why your scripts work in your dev/test environment and not on your web server
 
For Windows:

Start>Run>command
C:\Perl\bin\perl nameofyourscript.pl

That will do it.

Hope this helps.
-Vic

vic cherubini
malice365@hotmail.com
====

Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director

Wants to Know: Java, Cold Fusion, Tcl/TK

====
 
I've got a compiler for Perl.
It works fine when I type

perl search.pl (that's the file i want to excecute)

But when I want to test it local with my webserver it doesn't work.

I've got a form witch posts the results from that form to the search.pl file. When I post the form my Internet explorer gives an HTTP 501/505 error. It sais: " not implemented or not intergrated" (or something like that because my browser is dutch).

How can I make it work?

Eek
 
htttp 501/505 is a server error
sounds like your web server is not set up to serve cgi but that's a guess.

Try a small script that just outputs some simple html and see if that works

does the script have to be in a "cgi-bin" directory
? c:\webshare\scripts ?
 
The script isn't recognised i think.

How do get a CGI-bin?
If that is what i need to get it to work.
 
What web server are you running ?
on what o/s ?
with which perl ?

I am assuming that you're running the microsoft "personal web server"
( I'm testing my website local by using a personal webserver )
Which i don't know a lot about.
What i do know is,

- there is a script directory ( probably c:\webshare\scripts ? ) but i don't know how you would reference a script in it.

- you can control whether a directory under your root ( probably c:\webshare\webroot ? ) can run scripts by rightclicking on the folder icon for the directory and then selecting SHARING, then clicking on WEBSHARING


 
Yes, i'm running a personal webserver.
Still, i can't execute cgi files. Problably because i'm not running appache... That's what i'm hearing from people around.

Tanx anyway,
Eek
 
It is easy to set up but you need IIS installed to do it. There is no place in the control panel for PWS to do it. On my system, IIS appeared to already be there but was not activated. Once it's installed, there is a place in the set up screen for IIS where you need to associate .cgi and .pl files to run in the browser. It's kind of tucked away inside under several buttons worth of levels. I've set it up on several systems but found that the details seem a little different on each one as to the names of the buttons/tabs.

Don
don@ctagroup.org
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT (only when I have to!)
 
My humble suggestion is that you download and install Apache. It is free. It is very competent. There is a lot of free support for it (the TT Apache and CGI forums), it remains the web standard, and it works well with Perl.

The download comes with a README file that is pretty straight forward and full HTML documentation.


keep the rudder amid ship and beware the odd typo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top