Apache Friends Support Forum

It is currently 06. September 2010 02:20

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: perl and xampp
PostPosted: 30. December 2005 16:21 
Offline

Joined: 30. December 2005 11:23
Posts: 12
well first off i'm not sure weather this should be here or with the perl stuff.

and the problem
for a stat i have no idea how to run perl programs. secondly the perl add on sasy the version of xampp isn't late enough when its the latest version i can download and its about the version its askign for. i ran the update to update it to the version it is already which made no difference.

so how do i run perl programs and how do i get the perl add on to work?


Top
 Profile  
 
 Post subject:
PostPosted: 01. February 2006 17:07 
Offline

Joined: 15. May 2005 13:51
Posts: 122
Try to help here:

I use the very latest XAMPP(Apache 2.2) and Perl Addon for apache 2.2.

After following what the readme-addon-perl.txt specificed, you can place your perl script into x:\xampp\htdocs\modperl. And run your script using windows command prompt(cmd) under this directory.

e.g. my xampp is under C:\, my full path to modperl is:
c:\xampp\htdocs\modperl\

let say I have a perl script called myFirstPerl.pl, this file will be placed under c:\xampp\htdocs\modperl\myFirstPerl.pl. Then start command prompt, change your directory to c:\xampp\htdocs\modperl, then run: perl myFirstPerl.pl, Your perl script should work.

OK, you can also edit your system PATH variable to include the c:\xampp\htdocs\modperl. Doing this will make you avoid from manually changing the directory in command prompt.

BTW, you can see x:\xampp\apache\conf\extra\perl.conf for reference.

Hope it helps.


Top
 Profile  
 
 Post subject:
PostPosted: 02. February 2006 22:20 
Offline

Joined: 30. December 2005 11:23
Posts: 12
cool... thanks for the help, very much appreciated

[edit] ok... i can't get it to work.. i'm using run in the start bar... i take it i should be opening one of the pearl line interpreters (of which the are 4+) and tyeping in the command to run a program(which i don't know....)


Top
 Profile  
 
 Post subject:
PostPosted: 03. February 2006 14:33 
Offline

Joined: 15. May 2005 13:51
Posts: 122
Ok, you are unable to run your perl code in command prompt right?

Try this:

open your command prompt, and change to the direcotory which resides your perl code. for example, if there is a perl code called hello_world.pl, resided in c:\xampp\htdocs\modperl, you should type in your command prompt:

cd c:\xampp\htdocs\modperl

once in the working directory, type:

perl hello_world.pl

The perl code will be run automatically.

Hope it helps. If I misunderstand your meaning, please let me know.


Top
 Profile  
 
 Post subject:
PostPosted: 04. February 2006 17:50 
Offline

Joined: 30. December 2005 11:23
Posts: 12
i got all that now but i got a prob.. when i type teh "perl simple.pl" (simple being the file) i get this 'error'
'perl' is not reconised as an internal or external command, operatable program or batch file

not sure what to do now.... are you using the normal windows command promt or a xampp perl one?


Top
 Profile  
 
 Post subject:
PostPosted: 04. February 2006 18:47 
Offline

Joined: 15. May 2005 13:51
Posts: 122
Hi

I use normal windows CMD.

Probably you haven't set the system PATH variable, which make your system cannot find the perl command. To make your Windows find your perl command, you should setup the system PATH variable by doing the following:

1. right click "My Computer" > properties, or go to control panel > system
2. A window appear, find and click on "Advance" tags
3. At the bottom of this window, click the "Environment variable" button (underscore N)
4. Another small window appear, in the system variable list (the bottom one), find and select the variable called "PATH", and click "Edit"
5. In the variable value input field (the bottom input field), enter the path to perl/bin, REMEMBER KEEP ALL EXISTING VALUE UNCHANGE.

For example, BEFORE CHANGE, the value is:

%SystemRoot%\system32;%SystemRoot%;...

AFTER CHANGE (assume your perl bin dir is in c:\xampp\perl\bin):

c:\xampp\perl\bin;%SystemRoot%\system32;%SystemRoot%;...

remember to put a semi-colon(;) between each path value.

Hope it helps.


Top
 Profile  
 
 Post subject:
PostPosted: 04. February 2006 23:30 
Offline

Joined: 30. December 2005 11:23
Posts: 12
wow.. it works.. thats dude.. its things like that that should be added to the FAQ's......


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group