×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

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

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

(OP)
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

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

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.

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

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

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

For Windows:

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

That will do it.

Hope this helps.
-Vic

vic cherubini
malice365@hotmail.com
www.epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
Wants to Know: Java, Cold Fusion, Tcl/TK
====

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

(OP)
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

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

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 ?

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

(OP)
The script isn't recognised i think.

How do get a CGI-bin?
If that is what i need to get it to work.

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

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


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

(OP)
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

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

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
http://www.helpscc.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!)

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

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close