Perl not working on my Zampp

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

Perl not working on my Zampp

Postby marksu » 27. December 2008 19:28

I have had the xampp 1.6.6a installed for a long time.
I have not got any problems untill trying to run perl scripts.

I have the perl.exe in C:\xampp\perl\bin.

When trying to run perl command at commpand prompt it is not found.

TESTING
1. If testing by copying the perl.exe to C:\xampp\cgi-bin then running perl test.pl then hallo world script works.

2. Testing my other script that uses code "use IO::Socket;"
I get error can't locate IO/Socket.pm ...

I dont think I have installed perl module manually, not sure?
Anyway I tried to find a way to install the perl module, but can't find perl module that can be installed on my xampp version 1.6.6a.
I have too mutch changes to my Xampp that I can't upgrade to newer Xampp.

Any ideas?

marksu
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby Sharley » 27. December 2008 21:46

marksu wrote:I have the perl.exe in C:\xampp\perl\bin.
Did you install the Perl Addon for XAMPP and did you follow the installation instruction in the readme-addon-perl.txt by running the setup_xampp.bat file 2 times?

What do you see when going to http://localhost and clicking on the Perl link under the Demos heading in the left menu?

In your cgi scripts does the shebang reflect your path to perl?
This post link may help explain that.
http://community.apachefriends.org/f/viewtopic.php?p=131608#p131608

marksu wrote:When trying to run perl command at commpand prompt it is not found.
How exactly did you do that?

What exactly is the error message?

Are there any clues in your Apache error file at the date and time you tried accessing perl?
C:\xampp\apache\logs\error.log
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 not working on my Zampp

Postby marksu » 27. December 2008 21:55

Thank you for your reply.
Under demos there are only following links.
CD Collection
Biorhythm
Instant Art
Flash Art
Phone Book
Excel_Writer
ADOdb

The installation was wery long ago so I do not remenber it well.
I presume I might not have installed the perl separately.

Any help how I can install it now?
The only perl module file I found on xamp site does not work on my old xampp version 1.6.6a.
The perl.exe file I have on my comuter is version 5.8.7.
I dont want to mess up the computer.

On page
http://sourceforge.net/project/showfile ... _id=113693
There are many perl isntall file but I do not know which works on my xamp version.

marksu
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby marksu » 27. December 2008 22:19

I will check the zip files read me text. It mig tell me what xamp version it can be installed on.
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby Sharley » 27. December 2008 22:37

marksu wrote:I will check the zip files read me text. It mig tell me what xamp version it can be installed on.
The clue is in the perl addon name, for example:
xampp-perl-addon-5.8.6-2.0.54.zip

The second set of numbers 2.0.54 is the suitable Apache version.

So check what Apache version you have installed and then look for and install the zip file corresponding to that version.

The simple install instruction are contained in the zip file.
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 not working on my Zampp

Postby marksu » 27. December 2008 23:23

Ok I allready installed wrong version.
Thank you for info now it is easyer to fix.
I have apache 2.2 but what does the pl1, pl2 etc. mean in the name.
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby Sharley » 27. December 2008 23:30

Don't use any of the PL1 or PL2 versions they are limited and don't have Active Perl.

Use the version that does not have the pl* extension.

There was quite a discussion here:
http://community.apachefriends.org/f/viewtopic.php?f=16&t=32051
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 not working on my Zampp

Postby marksu » 28. December 2008 00:42

Well seems that I messed my xampp by using wrong perl module.
The apache wont start anymore.

I think I might try to install the newest xampp tomorrow.


marksu
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby Sharley » 28. December 2008 00:48

What error message in the apache\logs\error.log file?

Try starting using apache_start.bat file as it will also give a useful error message.
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 not working on my Zampp

Postby marksu » 28. December 2008 01:22

Yes better to try tox old xamp as many changes been done on it.

Error.log:

[Sun Dec 28 01:01:44 2008] [error] Undefined subroutine &XSLoader::load called at C:/xampp/perl/lib/Apache2/Apache/Const.pm line 23.\nCompilation failed in require at C:/xampp/apache/conf/startup.pl line 10.\nBEGIN failed--compilation aborted at C:/xampp/apache/conf/startup.pl line 10.\nCompilation failed in require at (eval 2) line 1.\n

[Sun Dec 28 01:01:44 2008] [error] Can't load Perl file: C:/xampp/apache/conf/startup.pl for server localhost:80, exiting...

---------------
The file startup.pl line 10 is following:
use Apache::Const -compile => ':common';


apache_start.bat error
(OS 10048) Each address (protocol, network address or port) kan be used usually only once. make sock: could not bind to address 0.0.0.0:80
no listening sockets available , shutting down
unable to open logs.
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby Sharley » 28. December 2008 01:46

marksu wrote:Error.log:

[Sun Dec 28 01:01:44 2008] [error] Undefined subroutine &XSLoader::load called at C:/xampp/perl/lib/Apache2/Apache/Const.pm line 23.\nCompilation failed in require at C:/xampp/apache/conf/startup.pl line 10.\nBEGIN failed--compilation aborted at C:/xampp/apache/conf/startup.pl line 10.\nCompilation failed in require at (eval 2) line 1.\n

[Sun Dec 28 01:01:44 2008] [error] Can't load Perl file: C:/xampp/apache/conf/startup.pl for server localhost:80, exiting...
Check in your httpd.conf file that this line is uncommented and looks like this (near the end of the file):
# Perl
Include conf/extra/perl.conf

If you make any changes save the file and then try and restart Apache but see below error issue.

marksu wrote:apache_start.bat error
(OS 10048) Each address (protocol, network address or port) kan be used usually only once. make sock: could not bind to address 0.0.0.0:80
no listening sockets available , shutting down
unable to open logs.
This is telling that something else is using port 80 and Apache can't use it.
Double click on xampp-portcheck.exe and disable whatever it says is running on port 80 then try again.
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 not working on my Zampp

Postby marksu » 28. December 2008 02:08

Sharley wrote:Include conf/extra/perl.conf


Well the perl module had false file name it was perl.conf.new so I renamed it to perl.conf

Also the port 80 was in use by skype and now I changed that also.

It seems to work now. :D

Thanks a milloin Sharley. 8)

marksu
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby Sharley » 28. December 2008 02:13

That's good and thank the error logs as they are just so good at telling how things are. :)
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 not working on my Zampp

Postby marksu » 29. December 2008 15:43

Hi again.
I came back as getting still some trouble with the perl installation in regarding DBI module.

Running code
use DBI;

I get following error:
DBI object version 1.48 does not match $DBI::VERSION 1.46 at C:/xampp/perl/lib/DynaLoader.pm line 253.
BEGIN failed--compilation aborted at C:/xampp/perl/lib/DBI.pm line 254.
Compilation failed in require at server.pl line 13.
BEGIN failed--compilation aborted at server.pl line 13.

I have been browsing the net a lot and seems many have had similar problem.
According what I read about the problem is that multiple version of DBI is intalled.
I have not yet found clear and easy instructions how to clean it up though.

marksu
marksu
 
Posts: 20
Joined: 27. December 2008 19:12

Re: Perl not working on my Zampp

Postby Sharley » 30. December 2008 00:04

Use ppm.bat which should be located in the C:\xampp\perl\bin folder - it is in the xampp-win32-perl-addon-5.10.0-2.2.9 Addon 7zip archive that I use, which was the last known good version from SourceForge IIRC.

Open a command console window in the above folder - from start>Run...> type cmd.exe>OK then cd to the above folder or simply double click on the ppm.bat file.

This will open the Perl Package Manager window which then automagically connects to ActiveState's Package Repository to Synchronize the Database of modules - which on a slow dial-up connection may take some time - make sure your firewall will allow PPM to access the Internet.

Do not close the Command Console window until you are finished with the PPM or you will also close the PPM - you can minimize.

...and in PPM
click on menu View and select Upgradable packages after the sync has finished loading or experiment with the other alternatives in the View menu.
Check Installed with Available column.
Now select/highlight DBI.
Click on menu Action and select Install DBI.
Now click on menu File and select Run Marked Actions.
Click OK when the pop up confirmation displays.
Wait until the install is complete and at all times watch the display in the Status tab for info.
Now check the Details tab.
Now check under menu View the Installed Packages again to see the new DBI is installed.
Repeat the above for anymore packages you feel you need installed/updated.

Close the PPM window when finished or close the Console window which will do the same thing.

Good luck and if all else fails download the above 7zip version and simply install Perl again as it will overwrite any existing files but remember to run the setup bat file twice and to check those conf files again.
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

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 90 guests