Jump to content


Photo

Running Perl scripts


  • Please log in to reply
17 replies to this topic

#1 jkwng1

jkwng1

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 02 January 2006 - 03:28 AM

3.3 is Installed and running fine.

How can I run Perl script interactively?

I could create Perl scripts and place them in cgi-bin and run it using http://localhost/scriptname.pl

I found Perl.exe in W:\usr\bin. I could type stuff in it, but received no response.

What am I missing?

Thanks

#2 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 02 January 2006 - 07:58 AM

Ummm.. never really tried that before to actually know if it will work with CMDs, but the Perl Interpreter in Uniform Server does not have everything included with it. Its main purpose is as part of a Web Server, not a standalone.

I also believe that for that method to work, Perl has to installed in the system.. as in Registry Information and things like that.. thats why PPM does not work on Uniform Server.

I will look into it annd get back to you. :lol:

#3 couch-potatoe

couch-potatoe

    Junior Member

  • Member
  • Pip
  • 16 posts
  • Location:Kent, UK
  • Main OS: Windows XP

Posted 09 April 2006 - 03:44 PM

I dont know if this will help, but I hit a similar problem today, I was playing with SquirrelMail and its plugins, the system uses the command line perl interface to run the configuration utility...

I downloaded Active Perl and installed it and then copied perl.exe and perl58.dll from c:\perl\usr\bin to w:\usr\bin and the entire contents of c:\perl\user\lib to w:\usr\lib.

Having done this I found I could open a command prompt in w:\usr\bin and execut the following at the command line: -

perl.exe w:\www\config\conf.pl

This carried on working even after uninstalling Active Perl!

I can only guess that some entries in w:\usr\lib were missing (I needed to update perl.exe and perl58.dll to fix complaints about file versions - I appear to be running a newer version of Perl now...)

As I said,

Hope it helps...

Cheers

Couch Potatoe

#4 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 13 April 2006 - 12:23 PM

Yes, thats because of the files you copied over....

Not to be confused, are you saying the files you copied are deleted and it works? or somehing else....

Thanks.

#5 couch-potatoe

couch-potatoe

    Junior Member

  • Member
  • Pip
  • 16 posts
  • Location:Kent, UK
  • Main OS: Windows XP

Posted 20 April 2006 - 03:18 AM

Sorry, should have made myself clearer....

I've played a bit more since, and this works for me on a fresh copy of the Uniform server...

Download the Active Perl Zipped archive.

Overwrite the perl.exe and perl58.dll files that the Uniform server uses (in diskw\usr\bin) with new versions from the archive.

Overwrite the entire contents of the user\lib directory and sub directories that the Uniform Server uses (diskw\usr\lib) with the usr\lib files from the archive.

The Active Perl download is no longer needed...

Fire up the Uniform server then open a command prompt in w:\usr\bin

You should now be able to execute command line perl scripts in the command prompt window in the following manner

perl.exe w:\...path to perl file...\perl_file.pl

(I my case with SquirrelMail it was perl.exe w:\www\config\conf.pl)

There must be some files "missing" from usr\lib in the Uniform server setup that stop the command line working, unfortunately I dont know enough about Active Perl to figure out which ones :)

Hope this makes sense...

Couch Potatoe

#6 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 22 April 2006 - 11:26 PM

Yeah... there are...

Thanks. :D :)

#7 411

411

    Junior Member

  • Member
  • Pip
  • 15 posts

Posted 29 May 2006 - 08:46 AM

so, how to running Perl scripts? (step by step please...)
i have installed SquirrelMail and place all files at "w:\www\mail"
but when i running the configuration file (http://localhost/mail/config/conf.pl), it can run!
why and how to do it?

thanks :(
UNiVORM Design Studio and Laboratory

#8 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 08 June 2006 - 09:47 PM

Try placing it in thhe cgi-bin folder. W:/cgi-bin/

#9 411

411

    Junior Member

  • Member
  • Pip
  • 15 posts

Posted 11 June 2006 - 08:44 AM

so the url will be, "http://localhost/cgi-bin/mail" ?

Try placing it in thhe cgi-bin folder. W:/cgi-bin/


UNiVORM Design Studio and Laboratory

#10 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 11 June 2006 - 01:56 PM

Yap :)

#11 411

411

    Junior Member

  • Member
  • Pip
  • 15 posts

Posted 15 June 2006 - 06:50 AM

but when i run http://localhost/cgi-bin/mail
it can't run. i don't have permition to access that page.
why?

Yap :)


UNiVORM Design Studio and Laboratory

#12 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 15 June 2006 - 06:53 PM

Something must be wrong.... Are you following the directions....

Check the Apache Error Log and tell me what it says...

#13 MrX

MrX

    The Mad Theorist

  • Support Team
  • PipPip
  • 167 posts
  • Location:IRC :P
  • Wiki ID: MrX
  • IRC Nickname: MrX, MrX- and MrX_

Posted 23 June 2006 - 08:06 PM

Maybe it's because he hasn't uncommented
AddHandler cgi-script .bat .exe .pl .cgi
and
Action application/x-perl "/usr/bin/perl"
(which are of course, commented by default) in his httpd.conf?

#14 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 09 July 2006 - 04:48 PM

They shouuld not be commented... Hope you are not looking at the wrong cgi-bin mask in the httpd.conf file.... They come uncommented...

#15 MrX

MrX

    The Mad Theorist

  • Support Team
  • PipPip
  • 167 posts
  • Location:IRC :P
  • Wiki ID: MrX
  • IRC Nickname: MrX, MrX- and MrX_

Posted 10 July 2006 - 12:59 AM

Maybe it's because he hasn't uncommented

AddHandler cgi-script .bat .exe .pl .cgi
and
Action application/x-perl "/usr/bin/perl"
(which are of course, commented by default) in his httpd.conf?


Sorry about the confusion I caused, I've realized what I was missing in this post:

Ok, sorry for all that nonsense.
I take back what I said.

Now I know that "ScriptAlias" does the same thing as "AddHandler cgi-script .pl .cgi", thanks for telling me :(


Edited by MrX, 10 July 2006 - 01:00 AM.


#16 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 10 July 2006 - 11:29 PM

Yeah, i later read that also... :D

#17 MrX

MrX

    The Mad Theorist

  • Support Team
  • PipPip
  • 167 posts
  • Location:IRC :P
  • Wiki ID: MrX
  • IRC Nickname: MrX, MrX- and MrX_

Posted 11 July 2006 - 12:58 AM

Well, I was explaining that to the users (who obviously don't read every post in the forum), not you :D

#18 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,336 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 7

Posted 11 July 2006 - 11:59 PM

k... smartass... :D :lol:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users