|
Posted by Justin Wyllie on November 20, 2004, 2:34 am
Please log in for more thread options
Hi
I have just installed DBI and DBD-mysql on my server and cannot get it to
work. One problem may be that this is a 'Virtual Private Server' - I do not
have root access; I have access to a 'compartment' of the server with the
user mmsox4. When running Makefile.PL my ISP advised me to use this:
Makefile.PL PREFIX=/usr/home/mmsox4/usr/local
The DBI and DBD modules do seem to have installed themselves into my system
under the Perl installation. But there seems to be a problem when I try to
use them:
This is the line that is causing the error:
$dbh =
DBI->connect('DBI:mysql:test:localhost:3306','test','test',{RaiseError=>0,Pr
intError=>0}) or die($DBI::erstr);
This is the error:
/usr/libexec/ld-elf.so.1:
/usr/home/mmsox4/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd/auto/DBD/m
ysql/mysql.so: Undefined symbol "mysql_init"
It looks to me like something went wrong at the linking and compiling stage
and my mySQL installation was not found - the mySQL client libaries were not
linked - but, as you can tell, I am a stranger in these parts & I have no
idea how to proceed.
If someone can help me I will be very grateful.
With thanks
Justin Wyllie
|
|
Posted by Bill Karwin on November 19, 2004, 7:51 pm
Please log in for more thread options
Justin Wyllie wrote:
> Hi
>
> I have just installed DBI and DBD-mysql on my server and cannot get it to
> work. One problem may be that this is a 'Virtual Private Server' - I do not
> have root access; I have access to a 'compartment' of the server with the
> user mmsox4. When running Makefile.PL my ISP advised me to use this:
> Makefile.PL PREFIX=/usr/home/mmsox4/usr/local
When compiling DBD::mysql, you do need access to libmysqlclient. If
that's located outside your 'compartment' (do you mean a chroot jail?),
then you cannot use DBD::mysql.
When your ISP advised the PREFIX for compiling Perl modules, did they
know you were going to be compiling DBD::mysql? Or did they think you
were intalling other Perl modules that don't need external libraries?
Regards,
Bill K.
|
|
Posted by Sherm Pendley on November 20, 2004, 1:47 am
Please log in for more thread options Bill Karwin wrote:
> When compiling DBD::mysql, you do need access to libmysqlclient. If
> that's located outside your 'compartment' (do you mean a chroot jail?),
> then you cannot use DBD::mysql.
If that turns out to be the case, you might consider using DBD::mysqlPP
instead. It's a pure Perl implementation that speaks the network
protocol used by MySQL, instead of linking to the C library.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net Hire me! My resume: http://www.dot-app.org
|
|
Posted by Justin Wyllie on November 20, 2004, 4:37 pm
Please log in for more thread options
> Justin Wyllie wrote:
>
> > Hi
> >
> > I have just installed DBI and DBD-mysql on my server and cannot get it
to
> > work. One problem may be that this is a 'Virtual Private Server' - I do
not
> > have root access; I have access to a 'compartment' of the server with
the
> > user mmsox4. When running Makefile.PL my ISP advised me to use this:
> > Makefile.PL PREFIX=/usr/home/mmsox4/usr/local
>
> When compiling DBD::mysql, you do need access to libmysqlclient. If
> that's located outside your 'compartment' (do you mean a chroot jail?),
> then you cannot use DBD::mysql.
>
> When your ISP advised the PREFIX for compiling Perl modules, did they
> know you were going to be compiling DBD::mysql? Or did they think you
> were intalling other Perl modules that don't need external libraries?
>
> Regards,
> Bill K.
Hi Bill
Thank you. That makes things clearer for me. I think I must be in a chroot
jail.
I finally solved it though. I think the PREFIX bit helps Perl know where to
install the modules when you run make - but I still got the error. The
DBD-mysql Makefile has a line where it looks for mysql_config. It picks up
the locations of the mysqlclient libraries and header files from here. (You
can pass these as parameters to Makefile but I didn't have much luck with
this). In the end I edited the Makefile to give an absolute path to my mySQL
installation from the true server root and it worked. - I do have my own
mysql installation I think it was just that the Makefile couldn't find it
because of the chroot jail problem.
I will mention to my ISP - they obviously haven't considered this problem in
their documentation about installs that need external libraries.
Thanks to to Sherm
With Regards & thanks
Justin Wyllie
|
|
Posted by Ron Savage on November 20, 2004, 1:54 pm
Please log in for more thread options On Sat, 20 Nov 2004 12:34:33 +1100, Justin Wyllie wrote:
Hi Justin
> I have just installed DBI and DBD-mysql on my server and cannot get
> it to work. One problem may be that this is a 'Virtual Private
I suggest you email
dbi-users-subscribe@perl.org
ie subscribe at least for long enough to get help.
--
Cheers
Ron Savage, ron@savage.net.au on 20/11/2004
http://savage.net.au/index.html
|
| Similar Threads | Posted | | Problem with Net::FTP | July 21, 2004, 12:40 pm |
| DBI - DBD-DB2 Problem - Please help | June 2, 2005, 11:07 pm |
| Net::FTP->problem with put | February 28, 2006, 2:11 am |
| Re: Problem with DBD::DB2 on AIX. | September 20, 2006, 2:10 pm |
| net::telnet problem | July 23, 2004, 6:46 pm |
| Lwp Post Problem | September 1, 2004, 4:09 am |
| DBD-Pg installation problem | September 20, 2004, 10:34 pm |
| SSL LWP Timeout problem | September 21, 2004, 2:25 pm |
| Win32::API problem... | May 25, 2005, 5:33 pm |
| mod_perl2 problem | October 3, 2005, 8:02 am |
|