Page 1 of 1

Perl question

PostPosted: 02. March 2009 00:30
by notmyusername
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?

Re: Perl question

PostPosted: 02. March 2009 03:50
by Izzy
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.

Re: Perl question

PostPosted: 02. March 2009 23:33
by notmyusername
Okay, CGI with MiniPerl is ready ..., and "Object not found!" respectively.

To httpd.conf

I do not know what that error message means.

Re: Perl question

PostPosted: 02. March 2009 23:39
by Izzy
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"

Re: Perl question

PostPosted: 03. March 2009 02:48
by notmyusername
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/.

Re: Perl question

PostPosted: 03. March 2009 03:23
by Wiedmann
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".

Re: Perl question

PostPosted: 03. March 2009 03:46
by notmyusername
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.