Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old March 8th, 2001, 08:18 AM
Jessman72 Jessman72 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Centreville, Alabama
Posts: 25 Jessman72 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 3 sec
Reputation Power: 0
Send a message via AIM to Jessman72
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();


Reply With Quote
  #2  
Old March 8th, 2001, 12:03 PM
dsb dsb is offline
PerlGuy
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Posts: 714 dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 15 h 44 m 20 sec
Reputation Power: 36
Send a message via AIM to dsb
Talking

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

Reply With Quote
  #3  
Old March 9th, 2001, 08:13 AM
Jessman72 Jessman72 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Centreville, Alabama
Posts: 25 Jessman72 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 3 sec
Reputation Power: 0
Send a message via AIM to Jessman72
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!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Perl script to mySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway