I ran make install and something seems to have improved. When I run the script
use strict;
use DBI;
#probe DBI for available drivers
my @drivers = DBI->available_drivers();
##iterate through drivers and list the data source for each one
foreach my $driver (@drivers)
{
print "Driver: $driver<br>";
if ($driver ne "Proxy" && $driver ne "Multiplex") ##DBD:Proxy and
+DBD::Multiplex have problem with datasources
{
my @datasources = DBI->data_sources($driver);
foreach my $datasource (@datasources)
{
print "\tData Source is $datasource<br>";
}
}
print "\n";
}
i get the following
Driver: ExampleP
Data Source is dbi:ExampleP:dir=.
Driver: Proxy
Driver: mysql
However, I am a bit suspect as make test still returns errors (as in previous post) and I cant get a DBD-mysql (which used to work on a differen setup) script to run succesfully.
I want to try adding the lib path to the environmental variables but am a little uncertain as to how to do this. Could you point me in the right direction with regards to adding to env vars.
thankyou in advance | [reply] [d/l] [select] |
If this is a non-csh shell, the following should work. Lets assume your mysql library is in /usr/mysql/lib :
### Check current value (possibly SHLIB_PATH)
prompt > echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/lib
### Add new path
prompt > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/mysql/lib
prompt > export LD_LIBRARY_PATH
### Test it out
prompt > ./your_test_program.pl
Driver: ExampleP
Data Source is dbi:ExampleP:dir=.
Driver: Proxy
Driver: mysql
prompt >
### lather, rince, repeat
But, using make install was not meant to fix make test, but to ignore the errors. That is why i prefer not to do it that way. You said a program which worked elsewhere fails ... i would suggest writting a short bit of code to login to a mysql server, and do a select * ... if that works, the Driver is loading (which is what failed in make test), and the problem is either the version, or something else all together. | [reply] [d/l] [select] |