Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 95996 invoked from network); 3 Dec 2004 01:33:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Dec 2004 01:33:28 -0000 Received: (qmail 8680 invoked by uid 500); 3 Dec 2004 01:33:09 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 8639 invoked by uid 500); 3 Dec 2004 01:33:09 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 8593 invoked by uid 99); 3 Dec 2004 01:33:08 -0000 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=DNS_FROM_RFC_POST,FROM_ENDS_IN_NUMS,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of rctay1989@hotmail.com designates 65.54.187.61 as permitted sender) Message-ID: X-Originating-IP: [202.156.2.138] X-Originating-Email: [rctay1989@hotmail.com] X-Sender: rctay1989@hotmail.com In-Reply-To: From: "Ray Chuan" To: randy@theoryx5.uwinnipeg.ca Cc: modperl@perl.apache.org Bcc: Subject: Re: [error] Can't locate object method "bootstrap" via package "DBI" Date: Fri, 03 Dec 2004 09:31:30 +0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 03 Dec 2004 01:32:04.0043 (UTC) FILETIME=[E4BDD1B0:01C4D8D7] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks for all the help. Apparently, I changed the Apache's service logon settings, and it now works. >From: "Ray Chuan" >To: randy@theoryx5.uwinnipeg.ca >CC: modperl@perl.apache.org >Subject: Re: [error] Can't locate object method "bootstrap" via package >"DBI" >Date: Fri, 03 Dec 2004 09:28:43 +0800 > >yes, it worked...great, first time smth with DBI worked. > >Apache, MySQL and Perl all sit in the same dir, and drive. > >>From: Randy Kobes >>To: Ray Chuan >>CC: modperl@perl.apache.org >>Subject: Re: [error] Can't locate object method "bootstrap" via package >>"DBI" >>Date: Thu, 2 Dec 2004 09:21:05 -0600 (CST) >> >>On Thu, 2 Dec 2004, Ray Chuan wrote: >> >> > >- can you use, for example, DBI, in a simple mod_perl >> > >handler? >> > >> > no, even a bare script which invokes connect than >> > disconnect fails, as with the first post: >> > === >> > #!F:/Net/Perl/bin/Perl.exe >> > ## >> > ## Perl eg >> > use strict; >> > use DBI; >> > >> > my $dbh = DBI->connect("DBI:mysql:webdb;localhost", "foo", "p", >> > {PrintError=>0,RaiseError=>1}); >> > $dbh->disconnect(); >> > === >> >>Sorry I wasn't clear - I meant to try this in a handler >>other then ModPerl::Registry, something like: >>===================================================== >># file Apache/Hello.pm >>package Apache::Hello; >>use strict; >>use Apache::RequestRec (); # for $r->content_type >>use Apache::RequestIO (); # for $r->print >>use Apache::Const -compile => ':common'; >>use DBI; >> >>sub handler { >> my $r = shift; >> my $dbh = DBI->connect("DBI:mysql:webdb;localhost", >> "foo", "p", {PrintError=>0,RaiseError=>1}); >> $dbh->disconnect(); >> my $time = scalar localtime(); >> my $package = __PACKAGE__; >> $r->content_type('text/html'); >> $r->print(<<"END"); >> >>

Hello

>>Hello from $package! The time is $time. >> >>END >> return Apache::OK; >>} >> >>1; >>=========================================================== >>saved in F:\Net\Perl\site\lib\Apache2\Apache\Hello.pm, >>and then invoked in your httpd.conf as >>=========================================================== >>PerlModule Apache::Hello >> >> SetHandler perl-script >> PerlResponseHandler Apache::Hello >> >>========================================================== >>and accessed as http://localhost/hello. >> >>One other thing - is your Apache installation also on >>the F drive? If not, and if possible, can you try an >>Apache on F to see if that works (or try moving Perl >>to the drive Apache is on)? >> >>-- >>best regards, >>randy >> >>-- >>Report problems: http://perl.apache.org/bugs/ >>Mail list info: http://perl.apache.org/maillist/modperl.html >>List etiquette: http://perl.apache.org/maillist/email-etiquette.html >> > >_________________________________________________________________ >Find it on the web with MSN Search. http://search.msn.com.sg/ > > >-- >Report problems: http://perl.apache.org/bugs/ >Mail list info: http://perl.apache.org/maillist/modperl.html >List etiquette: http://perl.apache.org/maillist/email-etiquette.html > _________________________________________________________________ Find love on MSN Personals http://personals.msn.com.sg/ -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html