Jump to content


Photo

Connection to MySQL server


  • Please log in to reply
8 replies to this topic

#1 Cesario

Cesario
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 24 March 2006 - 06:56 AM

HI guys, im new to PHP. Recently i have been assigned to do PHP stuffs. IM having problems with the connection to MYSQL server using ADOdb to connect.

My error is
Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

Even though i have jus written jus a few sentence of codes.

<?php

require'adodb/adodb.inc.php';


$conn = &ADONewConnection('mysql');
$conn->connect('LOcalhost','rootx','cex','w2paylitex');

if(! $DB)
{
die("The problem was ");

}
else {
print "connected";

}

?>
Thankx

#2 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 24 March 2006 - 12:09 PM

Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

A couple of quesitons:

1. Are you trying to connect to adodb? or to mysql?

2. The error you are getting typically means you are using a server with PHP but mysql has not been enabled... PHP 5 dropped native support, you have to enable it... and in 4 is can be disabled if you choose...

#3 Cesario

Cesario
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 24 March 2006 - 07:05 PM

[!--quoteo(post=357898:date=Mar 24 2006, 07:09 AM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Mar 24 2006, 07:09 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

A couple of quesitons:

1. Are you trying to connect to adodb? or to mysql?

2. The error you are getting typically means you are using a server with PHP but mysql has not been enabled... PHP 5 dropped native support, you have to enable it... and in 4 is can be disabled if you choose...
[/quote]


how do i enable it. i was told to use adodb to actually get connected between PHP n MySQL.

#4 keeB

keeB
  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 24 March 2006 - 07:08 PM

[!--quoteo(post=358013:date=Mar 24 2006, 07:05 PM:name=Cesario)--][div class=\'quotetop\']QUOTE(Cesario @ Mar 24 2006, 07:05 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
how do i enable it. i was told to use adodb to actually get connected between PHP n MySQL.
[/quote]

adodb is a class that can be used to connect to a mysql database, but you need to do all of your work within that adodb class..

installing mySQL with php is very simple, and there's a guide at [a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a] .. just search for 'mySQL' and select 'manual' in the dropdown.

GOOD LUCK

Come visit my site to see my latest projects
http://nick.stinemates.org/wordpress/


#5 Cesario

Cesario
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 24 March 2006 - 07:37 PM

[!--quoteo(post=358017:date=Mar 24 2006, 02:08 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 24 2006, 02:08 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
adodb is a class that can be used to connect to a mysql database, but you need to do all of your work within that adodb class..

installing mySQL with php is very simple, and there's a guide at [a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a] .. just search for 'mySQL' and select 'manual' in the dropdown.

GOOD LUCK
[/quote]


but i got this error which point my sql connection
Debug Error: adodb\drivers\adodb-mysql.inc.php line 354 - Call to undefined function mysql_connect()

and when i check it out, its this.
if (ADODB_PHPVER >= 0x4300)
$this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword,
$this->forceNewConnect,$this->clientFlags);

i dont understand the forcenewconnect and clientflags, wad has these got to be related to me loggin into my database?

#6 keeB

keeB
  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 24 March 2006 - 08:23 PM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] installing mySQL with php is very simple, and there's a guide at [a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a] .. just search for 'mySQL' and select 'manual' in the dropdown.

GOOD LUCK[/quote]

Come visit my site to see my latest projects
http://nick.stinemates.org/wordpress/


#7 Cesario

Cesario
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 25 March 2006 - 04:38 PM

i dont see a manual in the dropdownlist.

#8 Cesario

Cesario
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 26 March 2006 - 03:03 PM

anywae, im more or less done wif it, jus dat i still cant get connected to the database and dunt even noe y. there error is still the same and i even read thru the links.

#9 Cesario

Cesario
  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 27 March 2006 - 03:01 AM

k done. thx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users