![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, all: My perl script is as follows (I name it as "intro4.pl"): #!d:/perl/bin/perl -w # select-user.pl - use current user's option file to connect use strict; use CGI qw(:standard); use lib qw(/apachee-lib/perl); |
#3
| |||
| |||
|
|
Xu, Qiang (XSSC SGP) wrote: #!d:/perl/bin/perl -w # select-user.pl - use current user's option file to connect use strict; use CGI qw(:standard); use lib qw(/apachee-lib/perl); As Perl runs without knowledge of Apache's configuaration you must specify full path: use lib "D:/Apache Group/Apache/htdocs/apachee-lib/perl/"; ... qw-style is bound to fail on the space, so it's manually quoted... or silently adapt cross-server|OS to the point of installation: eval{$ENV{'DOCUMENT_ROOT'}=substr($ENV{'SCRIPT_FIL ENAME'},0,length($ENV{'SCR IPT_FILENAME'})-length($ENV{'SCRIPT_NAME'}))}; #only needed using vhosts use lib "$ENV{'DOCUMENT_ROOT'}/apachee-lib/perl/"; |
#4
| |||
| |||
|
|
Hans van Harten wrote: Xu, Qiang (XSSC SGP) wrote: #!d:/perl/bin/perl -w # select-user.pl - use current user's option file to connect use strict; use CGI qw(:standard); use lib qw(/apachee-lib/perl); As Perl runs without knowledge of Apache's configuaration you must specify full path: use lib "D:/Apache Group/Apache/htdocs/apachee-lib/perl/"; ... qw-style is bound to fail on the space, so it's manually quoted... or silently adapt cross-server|OS to the point of installation: eval{$ENV{'DOCUMENT_ROOT'}=substr($ENV{'SCRIPT_FIL ENAME'},0, length($ENV{'SCRIPT_FILENAME'})-length($ENV{'SCRIPT_NAME'}))}; #only needed using vhosts use lib "$ENV{'DOCUMENT_ROOT'}/apachee-lib/perl/"; Thanks for your pointing out this space character's effect in qw(). But I wonder why it can't go to the folder according to the alias in http.conf, Perl.exe does not know about httpd.conf and thus will not read it. |
|
while the alias can be recognized in the mainbody of the script? Assuming you refer to $ENV{'DOCUMENT_ROOT'}, that's just an enviroment |
![]() |
| Thread Tools | |
| Display Modes | |
| |