|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I'm writng a perl script that will insert data into a database, but if continues to fail. I am getting the error message below. Does anyone have any ideas to get this to work. Thanks in advance for your help.
(Error Message from /etc/httpd/logs/error_log) Can't load '/usr/lib/perl5/site_perl/i386-linux/auto/DBI/DBI.so' for module DBI: /usr/lib/perl5/site_perl/i386-linux/auto/DBI/DBI.so: undefined symbol: dirty at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169. at /home/httpd/cgi-bin/test1.cgi line 30 BEGIN failed--compilation aborted at /home/httpd/cgi-bin/test1.cgi line 30. (snippet of code from Perl Script) use lib '/usr/lib/perl5/site_perl'; use DBI; $db = "DBI:mysql:test"; $table = "requests"; $user = "root"; $password = "abc!123"; $dbh = DBI->connect('$db', '$user', '$password') || die "Connect failed: $DBI::errstr\n"; $sql = "INSERT INTO $table (first,last,eid,jtitle,project,phone,fax,email,role,approver,approverTitle,approverEmail) VALUES ('$fname','$lname','$employeeID','$jtitle','$application','$phone','$fax','$email','$role','$approve dBy','$approvedByTitle','$approverEmail')"; $sth = $dbh->prepare($sql) || die "prepare: $sql: $DBI::errstr"; $sth->execute || die "execute: $sql: $DBI::errstr"; $sth->finish(); $dbh->disconnect(); |
|
#2
|
|||
|
|||
|
Looks like it could be something wrong with the installation of DBI. That or perhaps the 'use lib' is throwing it off. You don't need to have that if you've installed DBI correctly. I don't think that's it though.
__________________
- dsb - ![]() Perl Guy |
|
#3
|
|||
|
|||
|
DBI
After your post, I started reviewing the error message in several other locations, and I believe you are correct.
Other sites mention that DBI should be upgraded from the version that I have to eliminate the problem. I'll upgrade the DBI and let ya know if it works...thanks! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Perl script to mySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|