Hi, all: I have installed ActivePerl 5.6.1 Build 628 in my PC, and install Apache web server version 1.3.23. And I want to use perl scripts to access database.
My perl script is as follows: ---------------------------------------------------------------------------- ----------------------------------- #!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); use WebDB; my($dbh, $user); #$dbh = WebDB::connect(); $dbh = WebDB::connect_with_option_file(); $user = $dbh->selectrow_array ("SELECT USER()"); print header(), start_html("Select User"); print p("You connected as $user\n"); print end_html(); $dbh->disconnect(); exit(0); ---------------------------------------------------------------------------- ----------------------------------- I have put the package WebDB.pm into the folder D:\Apache Group\Apache\htdocs\apachee-lib\perl\. But I always get the following error when running this script through web: ---------------------------------------------------------------------------- ----------------------------------- [Wed Aug 06 18:41:11 2003] [error] [client 12.345.67.890] Premature end of script headers: d:/apache group/apache/cgi-bin/mysql/intro4.pl [Wed Aug 06 18:41:11 2003] [error] [client 12.345.67.890] Can't locate WebDB.pm in @INC (@INC contains: /apachee-lib/perl/ d:/Perl/lib d:/Perl/site/lib .) at d:\APACHE~1\apache\cgi-bin\mysql\intro4.pl line 7. [Wed Aug 06 18:41:11 2003] [error] [client 12.345.67.890] BEGIN failed--compilation aborted at d:\APACHE~1\apache\cgi-bin\mysql\intro4.pl line 7. ---------------------------------------------------------------------------- ----------------------------------- After tests, I found it may due to the space character in the path "D:\Apache Group\Apache\htdocs\apachee-lib\perl\", for if I move the package to another place -- D:\test, then it can be found. But I want to keep it under the folder of Apache web server, can I? I have thought of a walk-around to make an alias in http.conf, and use that alias in the use ... expression, but not successfully. Here are my scripts: In http.conf: Alias /perlib/ "D:/Apache Group/Apache/lib/perl" <Directory "D:/Apache Group/Apache/lib/perl"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> In my perl script: use lib qw(/perlib/); use WebDB; I have moved the package WebDB.pm to the folder D:/Apache Group/Apache/lib/perl, but it still can't be found. Why the alias can't be recognized? anyone can help? thanks, Regards, Xu Qiang _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs