XAMPP perl @INC modification (XP SP3) 1.7.2 [SOLVED]

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

XAMPP perl @INC modification (XP SP3) 1.7.2 [SOLVED]

Postby DragonCoding » 04. October 2011 18:40

I have had XAMPP up and running for more than a year, everything very stable and am enjoying it. It is version 1.7.2 running on WinXP sp3.

However, I am trying to add Foswiki to my installation, so we can expand the server's role into a knowledge base and documentation repository.

I went through and installed Foswiki, everything seemed to be going along good, but now Apache fails to start.

Here is the error log:

[Tue Oct 04 11:37:42 2011] [error] Can't locate c:/webserverroot/foswiki/tools/mod_perl_startup.pl in @INC (@INC contains: C:/xampp/perl/lib C:/xampp/perl/site/lib C:/xampp/apache) at (eval 2) line 1.\n
[Tue Oct 04 11:37:42 2011] [error] Can't load Perl file:

So, I know what the problem is, c:/webserverroot/foswiki/ isn't in the @INC path, but I can't seem to modify the @INC path.
I added the path to the PATH environment variable, as well as to PERL5LIB, as shown in the info from printenv.pl:

PATH="C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\ThinkPad\Utilities;C:\WINDOW
S\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\Infoprint Se
lect;C:\Notes;C:\Program Files\XLView;C:\lotus\compnent;C:\Utilities;C:\Program
Files\Common Files\Lenovo;C:\program files\ibm\personal communications\;C:\Progr
am Files\IBM\Trace Facility\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Progr
am Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:
\webserverroot\foswiki\lib\"

PERL5LIB="C:\xampp\perl\site\lib\;c:\webserverroot\foswiki\lib\"

I would rather not move all of the Foswiki modules into the paths in @INC, I would rather modify the @INC.

Anyone know of how to do this?

Thank you

Patrick
DragonCoding
 
Posts: 2
Joined: 04. October 2011 18:30

Re: XAMPP perl @INC modification

Postby DragonCoding » 04. October 2011 18:56

OK, right after I posted I reread my own post....
and then a light went on! :idea:

Here I was trying to modify the @INC of perl, and forgot to check Apache docs to see how to modify it for Apache.

Well here is how to do it from perl.apache.org:

Two ways to alter @INC at server startup:

In the configuration file. For example add:

PerlSetEnv PERL5LIB /home/httpd/perl
or

PerlSetEnv PERL5LIB /home/httpd/perl:/home/httpd/mymodules
Note that this setting will be ignored if you have the PerlTaintCheck mode turned on.

In the startup file directly alter the @INC. For example

startup.pl
----------
use lib qw(/home/httpd/perl /home/httpd/mymodules);
1;

and load the startup file from the configuration file by:

PerlRequire /path/to/startup.pl


I chose to do it in the startup.pl file, since it already exists.
And was able to get past that error...

Of course that generated a different error, but I think I can get that one straightened out.

Thank you all for your help, and I absolutely love the software!

Patrick
DragonCoding
 
Posts: 2
Joined: 04. October 2011 18:30

Re: XAMPP perl @INC modification

Postby Sharley » 26. October 2011 19:27

Thanks Patrick for your feedback. 8)

Would you be so kind as to update your profile please.
viewtopic.php?f=16&t=48626

Thanks and 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


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 135 guests