| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| cyber_gremlin -
 
 
 Joined: 13 Aug 2005
 Posts: 9
 
 
 | 
			
				|  Posted: Wed Aug 17, 2005 12:10 pm    Post subject: Perl Script error - 500 |   |  
				| 
 |  
				| 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 |     | 
	
		|  | 
	
		| aprelium -
 
 
 Joined: 22 Mar 2002
 Posts: 6800
 
 
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| cyber_gremlin -
 
 
 Joined: 13 Aug 2005
 Posts: 9
 
 
 | 
			
				|  Posted: Fri Aug 19, 2005 4:41 pm    Post subject: Can't connect error!! |   |  
				| 
 |  
				| 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 |     | 
	
		|  | 
	
		| cyber_gremlin -
 
 
 Joined: 13 Aug 2005
 Posts: 9
 
 
 | 
			
				|  Posted: Fri Aug 19, 2005 4:42 pm    Post subject: |   |  
				| 
 |  
				| 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 |     | 
	
		|  | 
	
		| MonkeyNation -
 
 
 Joined: 05 Feb 2005
 Posts: 921
 Location: Cardiff
 
 | 
			
				|  Posted: Fri Aug 19, 2005 5:40 pm    Post subject: |   |  
				| 
 |  
				| 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 |            | 
	
		|  | 
	
		| cyber_gremlin -
 
 
 Joined: 13 Aug 2005
 Posts: 9
 
 
 | 
			
				|  Posted: Fri Aug 19, 2005 10:19 pm    Post subject: |   |  
				| 
 |  
				| 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 |     | 
	
		|  | 
	
		| AbyssUnderground -
 
 
 Joined: 31 Dec 2004
 Posts: 3855
 
 
 | 
			
				|  Posted: Fri Aug 19, 2005 10:24 pm    Post subject: |   |  
				| 
 |  
				| These usernames and passwords are for your MySQL database. _________________
 Andy (AbyssUnderground) (previously The Inquisitor)
 www.abyssunderground.co.uk
 |  | 
	
		| Back to top |       | 
	
		|  | 
	
		| MonkeyNation -
 
 
 Joined: 05 Feb 2005
 Posts: 921
 Location: Cardiff
 
 | 
			
				|  Posted: Sat Aug 20, 2005 5:47 am    Post subject: |   |  
				| 
 |  
				|  	  | 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 |            | 
	
		|  | 
	
		|  |