You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Global Junk <gl...@yahoo.com> on 2003/11/11 17:36:00 UTC
mod_perl and mysql
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
Does anyone have any ideas or links to help with
Mod_Perl and MySQL running together?
Thanks.
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Tobias Kremer <to...@funkreich.de>.
I'm quite sure that this happens because you're using
mod_perl AND php compiled into the same apache. I've been
running into this kind of trouble several times (on different
machines with different apache/mod_perl/php versions - mod_perl
was always compiled statically. I tried php statically and
dynamically with built-in mysql-support and linked to my
installed mysql libraries - nothing helped).
I finally gave up on this and am now running two separate
apache servers (one for php, one for mod_perl) on my machine
which kinda sucks :(
--
Cheers,
Tobias
Zitat von Global Junk <gl...@yahoo.com>:
> 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
>
> Does anyone have any ideas or links to help with
> Mod_Perl and MySQL running together?
>
> Thanks.
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
> --
> Reporting bugs: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
>
>
>
---------------------------------------------------
http://www.funkreich.de // may the funk be with you
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Global Junk <gl...@yahoo.com>.
I don't have full control over my installation because
I'm hosting with someone else. But I was able to
remove mod_php and it worked!!
Since I'm not using php this works for me.
Thanks Perrin you are awesome!
--- Perrin Harkins <pe...@elem.com> wrote:
> On Tue, 2003-11-11 at 11:36, Global Junk wrote:
> > Does anyone have any ideas or links to help with
> > Mod_Perl and MySQL running together?
>
> It may be PHP that is causing the problem here.
>
> See this warning in the docs:
>
http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_exit_signal_Segmentation_fault__11___with_mysql
>
> If you check the archives, you'll see many
> complaints about this, and
> they were all resolved by changing PHP compile
> options or upgrading to a
> newer MySQL driver.
>
> - Perrin
>
> --
> Reporting bugs: http://perl.apache.org/bugs/
> Mail list info:
> http://perl.apache.org/maillist/modperl.html
>
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Perrin Harkins <pe...@elem.com>.
On Tue, 2003-11-11 at 11:36, Global Junk wrote:
> Does anyone have any ideas or links to help with
> Mod_Perl and MySQL running together?
It may be PHP that is causing the problem here.
See this warning in the docs:
http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_exit_signal_Segmentation_fault__11___with_mysql
If you check the archives, you'll see many complaints about this, and
they were all resolved by changing PHP compile options or upgrading to a
newer MySQL driver.
- Perrin
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by John Day <jo...@wordsnimages.com>.
At 06:46 PM 11/11/2003 +0000, Andrew Green wrote:
>On Tue, 11 Nov 2003 18:19:31 +0000 (GMT), Ged Haywood wrote:
>
>> 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.
>
>Really? Is it ill-advised to use 5.8.1 in a production mod_perl
>environment? I'm in the process of setting up a new server, and I'd
>like to make sure the UTF8 handling is as good as it can be, and it'll
>be doing a fair amount of XML work. And I'll be using MySQL too.
Well, my older production machines are using 5.6.1 with mod_perl and that has been working very well for 8 months on VERY heavily used servers. After everything was debugged one machine has been up for 186 days with no trouble at all.
Newer production machines are using Perl 5.8.1 as is my development machine, after many issues, hassles and downright nasty problems with 5.8.0 I moved to 5.8.1. Perl, Apache and mod_perl were all built locally.
Perl 5.8.2 is out now for at least a week. I have not heard of any issues relating to its use.
john
>Cheers,
>Andrew.
>
>--
>Reporting bugs: http://perl.apache.org/bugs/
>Mail list info: http://perl.apache.org/maillist/modperl.html
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Stas Bekman <st...@stason.org>.
Andrew Green wrote:
> On Tue, 11 Nov 2003 19:01:57 +0000 (GMT), Ged Haywood wrote:
>
>
>>Perl 5.8.1 is not binary compatible with 5.8.0, which was not the
>>intention and 5.8.2 will return to compatibility, hence my comment.
>
>
> Ah, I see. Sorry for the misunderstanding.
And 5.8.2 is out for almost a week now. And it's binary compatible with both
5.8.0 and 5.8.1. And it's almost the same as 5.8.1 (it was released early to
solve the binary compatibility (which doesn't really affect most people) as
Ged has suggested).
So if you need to upgrade go with 5.8.2.
__________________________________________________________________
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
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Andrew Green <an...@article7.co.uk>.
On Tue, 11 Nov 2003 19:01:57 +0000 (GMT), Ged Haywood wrote:
> Perl 5.8.1 is not binary compatible with 5.8.0, which was not the
> intention and 5.8.2 will return to compatibility, hence my comment.
Ah, I see. Sorry for the misunderstanding.
> ...your own bugs will be much more troublesome than Perl's.
Amen to that.
Cheers,
Andrew.
--
::
article seven Andrew Green
automatic internet andrew@article7.co.uk | www.article7.co.uk
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,
On Tue, 11 Nov 2003, Andrew Green wrote:
> On Tue, 11 Nov 2003 18:19:31 +0000 (GMT), Ged Haywood wrote:
>
> > 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.
>
> Really? Is it ill-advised to use 5.8.1 in a production mod_perl
> environment?
I didn't say that, and Stas would have jumped on me if I had. Perl
5.8.1 is not binary compatible with 5.8.0, which was not the intention
and 5.8.2 will return to compatibility, hence my comment. There have
been a few other things too, you can check the archives for details.
My belief is that 5.8.1 is rather better than 5.8.0 as regards actual
faults, and a lot of people are using it. I'm not one of them.
> I'm in the process of setting up a new server, and I'd like to make
> sure the UTF8 handling is as good as it can be, and it'll be doing a
> fair amount of XML work. [snip]
You'll have a lot of fun with that... :) Is it to be a new codebase
too? If so then I don't think you'll need to worry about it at all,
your own bugs will be much more troublesome than Perl's.
73,
Ged.
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Andrew Green <an...@article7.co.uk>.
On Tue, 11 Nov 2003 18:19:31 +0000 (GMT), Ged Haywood wrote:
> 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.
Really? Is it ill-advised to use 5.8.1 in a production mod_perl
environment? I'm in the process of setting up a new server, and I'd
like to make sure the UTF8 handling is as good as it can be, and it'll
be doing a fair amount of XML work. And I'll be using MySQL too.
Cheers,
Andrew.
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl and mysql
Posted by Matthew Darwin <ma...@mdarwin.ca>.
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
Re: mod_perl and mysql
Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
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