I've been using mysql+mod_perl for years. You should check that you aren't connecting to the database in the apache startup phase and then using the same connection in a handler.

Ged Haywood wrote:
Hi there,

On Tue, 11 Nov 2003, Global Junk wrote:


I'm running Linux Apache/1.3.26 (Unix) mod_perl/1.26
PHP/4.2.3 and MySQL.
I'm trying to write a simple web (perl) application
that accesses a mysql database. I'm using DBI(). When I access the site under normal Perl it works. When I access the site under Mod_Perl I get:


child pid 20524 exit signal Segmentation fault (11),
possible coredump in /usr/local/apache


You should upgrade both Apache and mod_perl to the latest releases,
1.3.29 and 1.29, although that's unlikely to fix your segfault by
itself.  You don't say how mod_perl was compiled (nor who compiled it)
I'd recommend static if possible.  You must use the same compiler (I
always use gcc, try something like 3.2.x or 3.3.2 if you can but 2.95
is OK for example) to compile Perl and mod_perl.  You don't say which
versions of Perl, MySQL and DBI you're using, but check they're up to
date too.  If you're using Perl 5.005_03 that's fine, but don't use
5.6.0.  If you're using 5.8.0 right now you're probably best advised
to wait for Perl 5.8.2, as 5.8.1 has a few issues - but it does work
OK.  You don't say what the machine is, I guess it's a PC.  No
problems there unless you're short on memory, how much have you got?
Are you using PHP?


Does anyone have any ideas or links to help with
Mod_Perl and MySQL running together?


It's a very common and very reliable setup, I and many others have
been using it for years, with many different versions of Apache,
mod_perl and mysql on many different machines.  There are no real
problems them working together.

73,
Ged.




--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to