Perl Script error - 500

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
cyber_gremlin
-


Joined: 13 Aug 2005
Posts: 9

PostPosted: Wed Aug 17, 2005 12:10 pm    Post subject: Perl Script error - 500 Reply with quote

I recently had a perl script error when trying to run it from my test website. Error 500 - internal sever error. I found out that I did not have the DBI module for use with mysql so I downloaded it and attempted to run the script again. I tried to run the script to test it from my command line interface but it now says .. cannot locate loadable object for module DBI ...

Can anyone help pls.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Aug 17, 2005 1:15 pm    Post subject: Re: Perl Script error - 500 Reply with quote

cyber_gremlin,

Please read http://www.aprelium.com/forum/viewtopic.php?t=1725 to know how to install DBI. Be sure to choose the module that matches with your Perl version.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
cyber_gremlin
-


Joined: 13 Aug 2005
Posts: 9

PostPosted: Fri Aug 19, 2005 4:41 pm    Post subject: Can't connect error!! Reply with quote

Hi I have installed dbi module for perl and the the relevant mysql drivers but when i run the script i get this message. Can any one pls tell me what it means and how i can get it to work. Thank you.
Back to top View user's profile Send private message
cyber_gremlin
-


Joined: 13 Aug 2005
Posts: 9

PostPosted: Fri Aug 19, 2005 4:42 pm    Post subject: Reply with quote

Sorry I forgot the erro message...

Content-Type: text/html; charset=ISO-8859-1
Software error:
Couldn't connect

For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.


pls help!
Back to top View user's profile Send private message
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Fri Aug 19, 2005 5:40 pm    Post subject: Reply with quote

Are the host, username and password correct?
Im guessing that means the module works, it just has the wrong details and "couldn't connect".
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
cyber_gremlin
-


Joined: 13 Aug 2005
Posts: 9

PostPosted: Fri Aug 19, 2005 10:19 pm    Post subject: Reply with quote

Yeh the module now works.

I am using mysql. I am using .localhost to try and run the script from my web page.

I think the problem occurs in the lines below. I'm not sure which username and password...

$datasource = 'DBI:mysql:database=kofi;host=localhost';
$user = 'which username???';
$pass = 'which password???';
$dbh = DBI->connect($datasource, $user, $pass) or die "Couldn't connect\n";

I hope the problem is identifyable from the information I have given. Can you help? Thanx!
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Aug 19, 2005 10:24 pm    Post subject: Reply with quote

These usernames and passwords are for your MySQL database.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Sat Aug 20, 2005 5:47 am    Post subject: Reply with quote

cyber_gremlin wrote:
Yeh the module now works.

I am using mysql. I am using .localhost to try and run the script from my web page.

I think the problem occurs in the lines below. I'm not sure which username and password...

$datasource = 'DBI:mysql:database=kofi;host=localhost';
$user = 'which username???';
$pass = 'which password???';
$dbh = DBI->connect($datasource, $user, $pass) or die "Couldn't connect\n";

I hope the problem is identifyable from the information I have given. Can you help? Thanx!


If you haven't set up any privilages in MySQL yet then the default will be usename: root with no password. But running something as root is dangerous as it has full control over the server. Download a mysql manager off of the mysql site or possibly phpmyadmin for a web based option and create some privilages.
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group