Perl question

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

Perl question

Postby notmyusername » 02. March 2009 00:30

Just installed xampp, and patch2, and the perl addon. My webserver is accessible and PHP seems to work fine.
Attempting to run perl scripts (Kareha) causes error "Can't locate config.pl in @INC (@INC contains: . C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache)"
I added +ExecCGI to options, and AddHandler cgi-script .cgi .pl
What do I need to do?
notmyusername
 
Posts: 7
Joined: 01. March 2009 22:39

Re: Perl question

Postby Izzy » 02. March 2009 03:50

Can you go to http://localhost/cgi-bin/cgi.cgi and what do you see?

Can you go to http://localhost/cgi-bin/perltest.cgi and what do you see?

Can you go to http://localhost/cgi-bin/prntenv.pl and what do you see?

notmyusername wrote:I added +ExecCGI to options, and AddHandler cgi-script .cgi .pl
What do I need to do?
You added the above to where exactly?

notmyusername wrote:Attempting to run perl scripts (Kareha) causes error "Can't locate config.pl in @INC (@INC contains: . C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache)"
What does this mean?

Any clues in the apache\logs\error.log file?

Any issues with your Kareha script especially installation and configuration etc. can be found here:
http://wakaba.c3.cx/docs/docs.html#KarehaScript

This forum is for XAMPP issues and if the above perl test location questions above give satisfactory answers then there is no issues with your perl addon installation.
Last edited by Izzy on 12. March 2009 09:40, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Perl question

Postby notmyusername » 02. March 2009 23:33

Okay, CGI with MiniPerl is ready ..., and "Object not found!" respectively.

To httpd.conf

I do not know what that error message means.
notmyusername
 
Posts: 7
Joined: 01. March 2009 22:39

Re: Perl question

Postby Izzy » 02. March 2009 23:39

notmyusername wrote:...and "Object not found!"
Sorry, typo - should be http://localhost/cgi-bin/printenv.pl

notmyusername wrote:To httpd.conf
What does that mean? where exactly I asked.

BTW you don't need to add anything to the httpd.conf file as what you added already exists in the correct location.

notmyusername wrote:I do not know what that error message means.
I don't see the full error message from your apache\logs\error.log file.


Make sure the first line (Shebang) of all your perl scripts *.pl *.cgi have the correct path to perl:
#!"C:\xampp\perl\bin\perl.exe"
Last edited by Izzy on 12. March 2009 09:42, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: Perl question

Postby notmyusername » 03. March 2009 02:48

That last test script runs fine now.
The error message is:
Code: Select all
[Mon Mar 02 20:45:12 2009] [error] Can't locate config.pl in @INC (@INC contains: . C:/xampp/perl/site/lib/ C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache) at C:/xampp/htdocs/kareha/kareha.pl line 8.\nBEGIN failed--compilation aborted at C:/xampp/htdocs/kareha/kareha.pl line 8.\n


It fails when trying to load config.pl, and that happens even if I have NO hashbang in kareha.pl, whether I am working with my own kareha settings or the defaults. Config.pl doesn't actually contain executable code, it just sets variables. And it is in the same directory as kareha.pl, which is searching for it by name only. Even if I drop them in /cgi-bin/.
notmyusername
 
Posts: 7
Joined: 01. March 2009 22:39

Re: Perl question

Postby Wiedmann » 03. March 2009 03:23

Code: Select all
[Mon Mar 02 20:45:12 2009] [error] Can't locate config.pl in @INC ... at C:/xampp/htdocs/kareha/kareha.pl line 8.\n ...

Config.pl ... is in the same directory as kareha.pl,

Disable mod_perl with "setup_xampp.bat".
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Perl question

Postby notmyusername » 03. March 2009 03:46

Wiedmann wrote:
Code: Select all
[Mon Mar 02 20:45:12 2009] [error] Can't locate config.pl in @INC ... at C:/xampp/htdocs/kareha/kareha.pl line 8.\n ...

Config.pl ... is in the same directory as kareha.pl,

Disable mod_perl with "setup_xampp.bat".


Thanks, this did it.
notmyusername
 
Posts: 7
Joined: 01. March 2009 22:39


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests