Re: using dbi with mod_ruby

Shugo Maeda <[email protected]> Mon, 16 Aug 2004 11:57:10 +0900
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Hi,

jm wrote:
> Are there any tricks using dbi with mod_ruby? This rather simple example 
> raises an exception on sth.prepare() and the slightly more complicated 
> real code segfaults(11) mod_ruby. Further this code works in irb even 
> with $SAFE=1. Note, database details are fake of course.

You are using PHP, aren't you?

If so, please check the version of libmysqlclient.so linked to mysql.so
of PHP.

$ ldd /usr/lib/php4/20020429/mysql.so
                 libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 
(0x40028000)
...

Then please check the version of libmysqlclient.os linked to mysql.so of
Ruby.

$ ldd /usr/lib/ruby/1.8/i386-linux/mysql.so
...
         libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0x400ed000)
...

If their versions are different, you can't use both mysql.so on the same 

Apache instance.

Shugo