Just to update this...  The problem was with the detail I omitted below: PHP4.
The php.net buglist indicates that PHP 4.0.4 may fix the problem, but that is
the version I have - so I think it is still an open issue, even with PHP 4.0.4.
I'll report this to PHP.net so they are aware.

However, if anyone else is having this problem, reverting to PHP3 solved it for
me.  And, in my case, was a trivial and painless process.  

Thanks to all who mailed me great comments.  After 2.5 days of tracking this
little issue down, I was about to lose all control ;)  You all really helped
out.

        Thanks,
        -Eric.

Eric Peters wrote:

> Hi all-
>  
>         I'm really having a problem I hope I might be able to get some help
> with.  I'm using Apache 1.3.14, mod_perl 1.24, DBI 1.14, MySQL Modules 1.2215,
> Perl 5.6.0, and MySQL 3.22.32.  (I think that's all that's relevant)
>  
> In my httpd.conf I have the following:
>  
> #------------------------------
> <Location /testing>
>    SetHandler perl-script
>    PerlHandler Testing
> </Location>
> #------------------------------
>  
> And I have a script called Testing.pm that looks like this:
>  
> #------------------------------
> package Testing;
>  
> use strict;
> use DBI;
>  
> sub handler {
>   print "Content-type:\n\n<html><head><title>test</title></head><body><pre>";
>   print "Getting Data Sources...\n";
>  
>   my @drivers = DBI->data_sources('mysql');
>  
>   print "Done Getting Data Sources...\n";
>   foreach my $foo (@drivers) {
>     print "DataSource-> $foo \n";
>   }
>   print "Getting Data Sources Complete...\n";
>   print "</pre></body></html>\n";
> }
>  
> 1;
> #------------------------------
>  
> Consistantly, I get a SegFault when going to /testing.  Using strace, I see
> that it actually calls DBI and gets the valid results.  Everything looks good
> to me, but it dies after closing the FD.
>  
> The funny thing is, if I modify the Testing.pm module to be test.pl, it works.
>  
> #------------------------------
> #package Testing;
>  
> use strict;
> use DBI;
>  
> #sub handler {
>   print "Content-type:\n\n<html><head><title>test</title></head><body><pre>";
>   print "Getting Data Sources...\n";
>  
>   my @drivers = DBI->data_sources('mysql');
>  
>   print "Done Getting Data Sources...\n";
>   foreach my $foo (@drivers) {
>     print "DataSource-> $foo \n";
>   }
>   print "Getting Data Sources Complete...\n";
>   print "</pre></body></html>\n";
> #}
>  
> #1;
> #------------------------------
>  
> Anybody have any ideas?  I've tried everything I can come up with.
>  
>         Thanks,
>         -Eric.

Reply via email to