You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Warren Pollans <wa...@meyer-pollans.net> on 2003/04/15 20:57:51 UTC

Apache::DBI make test fails

Hello,

I'm re-installing modules after an upgrade of my ibook from 10.1.5 to  
10.2.5 and get the error shown below when "make test" runs for  
Apache::DBI.  This is the version of perl and mod_perl that comes with  
jaguar - perl v5.6.0, Apache/1.3.27 (Darwin) mod_perl/1.26.  I run cgi  
scripts through mod_perl - mod_perl seems to be working OK.  I noticed  
that during the DBI install - it kept complaining about the 5.6.0  
version of perl.

Any suggestions would be appreciated.


Thanks,

Warren


Here's the test(s) - the make test output follows

[t]$ cat 10mysql.t
use strict;
use Test::More tests => 7;

BEGIN {
   # trick DBI.pm into thinking we are running under mod_perl
   $ENV{GATEWAY_INTERFACE} = 'CGI-Perl';
   use_ok('Apache::DBI', 'load Apache::DBI')
};

my $dbd_mysql = eval { require DBD::mysql };

#$Apache::DBI::DEBUG = 10;

SKIP: {
   skip "Could not load DBD::mysql", 6 unless $dbd_mysql;

   ok($dbd_mysql, "DBD::mysql loaded");

   my $dbh_1 = DBI->connect('dbi:mysql:test:localhost', 'root',  
'b1gh3z', { RaiseError => 0, PrintError => 0 });

  SKIP: {
     skip "Could not connect to test database: $DBI::errstr", 5 unless  
$dbh_1;
     ok(my $thread_1 = $dbh_1->{'mysql_thread_id'}, "Connected 1");

     my $dbh_2 = DBI->connect('dbi:mysql:test:localhost', 'root',  
'b1gh3z', { RaiseError => 0, PrintError => 0 });
     ok(my $thread_2 = $dbh_2->{'mysql_thread_id'}, "Connected 2");

     is($thread_1, $thread_2, "got the same connection both times");

     my $dbh_3 = DBI->connect('dbi:mysql:test:localhost', 'root',  
'b1gh3z', { RaiseError => 0, PrintError => 1 });
     ok(my $thread_3 = $dbh_3->{'mysql_thread_id'}, "Connected 3");

     isnt($thread_1, $thread_3, "got different connection from different  
attributes");


   }


}

1;

+++++++++++++++++++++++++++++++++++

[Apache-DBI-0.91]$ sudo make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib  
-I/System/Library/Perl/darwin -I/System/Library/Perl -e 'use  
Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/10mysql....NOK 5#     Failed test (t/10mysql.t at line 28)
#          got: '14'
#     expected: '15'
t/10mysql....ok 7/7# Looks like you failed 1 tests of 7.
t/10mysql....dubious
         Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 5
         Failed 1/7 tests, 85.71% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
------------------------------------------------------------------------ 
-------
t/10mysql.t    1   256     7    1  14.29%  5
Failed 1/1 test scripts, 0.00% okay. 1/7 subtests failed, 85.71% okay.
make: *** [test_dynamic] Error 2

++++++++++++++++++++++++++++++++++++


Re: Apache::DBI make test fails

Posted by Jim Brandt <cb...@citmail.buffalo.edu>.
If you're up to trying an upgrade, Apple has some instructions for 
upgrading to Perl 5.8 here:

<http://developer.apple.com/internet/macosx/perl.html>

Note the caveat in the article that there are conflicts between 
binaries created for the Apple default 5.6.0 and the 5.8. This is for 
modules like storable that compile C code. This is mostly an issue if 
you are using Fink. Other than that, I've recently upgraded a new 
machine and things went OK with these instructions.

You can also find additional info on replacing/upgrading the default 
Jaguar apache/mod_perl with the latest versions here:

<http://www.macdevcenter.com/pub/a/mac/2002/12/18/apache_modssl.html>

I've found this series of articles by David Wheeler to be extremely 
helpful while playing with apache on Mac OS X.

I don't know if this specifically addresses your problem with 
Apache::DBI, but the first thing on most of the help pages I've seen is 
upgrade to the latest stable versions of the software you're using.

Good luck,
Jim

>> Hello,
>> I'm re-installing modules after an upgrade of my ibook from 10.1.5 to 
>>  10.2.5 and get the error shown below when "make test" runs for  
>> Apache::DBI.  This is the version of perl and mod_perl that comes 
>> with  jaguar - perl v5.6.0, Apache/1.3.27 (Darwin) mod_perl/1.26.  I 
>> run cgi  scripts through mod_perl - mod_perl seems to be working OK.  
>> I noticed  that during the DBI install - it kept complaining about 
>> the 5.6.0  version of perl.
>
> It complains for a reason. perl-5.6.0 is *very* buggy, so if you can 
> update to at least 5.6.1 chances are that all your problems will go 
> away. Care to try?
==========================================
Jim Brandt
Administrative Computing Services
University at Buffalo


Re: Apache::DBI make test fails

Posted by Stas Bekman <st...@stason.org>.
Warren Pollans wrote:
> Hello,
> 
> I'm re-installing modules after an upgrade of my ibook from 10.1.5 to  
> 10.2.5 and get the error shown below when "make test" runs for  
> Apache::DBI.  This is the version of perl and mod_perl that comes with  
> jaguar - perl v5.6.0, Apache/1.3.27 (Darwin) mod_perl/1.26.  I run cgi  
> scripts through mod_perl - mod_perl seems to be working OK.  I noticed  
> that during the DBI install - it kept complaining about the 5.6.0  
> version of perl.

It complains for a reason. perl-5.6.0 is *very* buggy, so if you can update to 
at least 5.6.1 chances are that all your problems will go away. Care to try?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Apache::DBI make test fails

Posted by Ask Bjoern Hansen <as...@develooper.com>.
On Tuesday, Apr 15, 2003, at 11:57 America/Los_Angeles, Warren Pollans 
wrote:

> [Apache-DBI-0.91]$ sudo make test
> PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib 
> -I/System/Library/Perl/darwin -I/System/Library/Perl -e 'use 
> Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' 
> t/*.t
> t/10mysql....NOK 5#     Failed test (t/10mysql.t at line 28)

You are probably using DBI v1.33 or newer.  :-)   It'll be fixed in the 
next Apache::DBI release (and in CVS later today).

The problem only affects the tests; Apache::DBI should work fine.


  - ask

-- 
http://www.askbjoernhansen.com/