Perl Path and Modules

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Perl Path and Modules

Postby Tedh » 15. December 2011 14:32

Hi, I've just installed XAMPP and find some things a bit odd.

Previously I've used IndigoPerl and had no problem. The path to perl on it is #!perl. Please note I used IndigoPerl because I did not have to do any black box work (I don't know how and and really don't want to).

I have two Questions.
1)
On my live server the path to Perl is #!/usr/bin/perl
On XAMPP you use #!"C:\xampp\perl\bin\perl.exe"
Is it possible to use #!/usr/bin/perl on XAMP? That would make stuff a lot easier.

2)
Indigo uses a Perl script (vpm.pl) to handle PPMs so Perl modules can be installed.
Does XAMPP have some sort of script so I can load Perl Modules like Indigo Perl does?

Thanks for any input
Tedh
 
Posts: 4
Joined: 15. December 2011 14:26
Operating System: XP Pro

Re: Perl Path and Modules

Postby Sharley » 16. December 2011 01:45

1. No guarantee but I just tested this old hack that was prevented in 1.7.3 by the developer after it was posted on the forum but seems to work again in 1.7.7.

Create a folder in the root of the drive or partition that XAMPP is installed on, for example in a default installation C:\usr

Next open the perl folder in XAMPP and copy by dragging with the Ctrl key pressed the 3 folders from the perl folder into the usr folder you just created.

Start Apache and MySQL and try one of your scripts with the #!/usr/bin/perl line and see if it works.

For example I changed the shebang in 2 files in the \xampp\cgi-bin folder, perltest.cgi and printenv.pl to #!/usr/bin/perl and then ran:
http://localhost/cgi-bin/perltest.cgi
and
http://localhost/cgi-bin/printenv.pl
with a success with both files.

I then copied those 2 files to the htdocs folder and repeated the above test omitting the cgi-bin like so:
http://localhost/printenv.pl
and once again both scripts worked fine.

Remember though that when you upgrade or install a later version of XAMPP that you would need to follow the above drag and drop folder procedure to update the perl files in the C:\usr folder.

2. In the C:\xampp\perl\bin folder and in the now C:\usr\bin folder is a ppm.bat file and a ppm.pl script which is most likely the equivalent but all I see is an error when I run either of these in the C:\xampp\perl\bin folder or in the C:\usr\bin folder, you may have more luck as I have run out of test time.

These 2 posts may help:
viewtopic.php?f=16&t=48111
viewtopic.php?f=16&t=49048
The latter outlines the errors that I get in 1.7.7 which still appear but that may be because perl in XAMPP may not be the Active Perl release and what is becoming more prevalent is the OP in this topic did not return to let us know if he found a solution for the one offered by JonB.

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Perl Path and Modules

Postby Tedh » 16. December 2011 14:07

I'll check it all out. Thanks.

Had a major glitch with my blog software, so only just got back to reply.

Thanks - Ted
Tedh
 
Posts: 4
Joined: 15. December 2011 14:26
Operating System: XP Pro

Re: Perl Path and Modules

Postby Tedh » 12. February 2012 21:31

Just to let you know that the drag to new folder works fine. I've been up to my eyeballs in stuff and realized that I had not got back to this post.

Thanks a lot - Ted
Tedh
 
Posts: 4
Joined: 15. December 2011 14:26
Operating System: XP Pro


Return to XAMPP for Windows

Who is online

Users browsing this forum: hthnightwolf, JJ_Tagy and 64 guests