Jump to content

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/5667-connection-to-mysql-server/
Share on other sites

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...
[!--quoteo(post=357898:date=Mar 24 2006, 07:09 AM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Mar 24 2006, 07:09 AM) [snapback]357898[/snapback][/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.
[!--quoteo(post=358013:date=Mar 24 2006, 07:05 PM:name=Cesario)--][div class=\'quotetop\']QUOTE(Cesario @ Mar 24 2006, 07:05 PM) [snapback]358013[/snapback][/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
[!--quoteo(post=358017:date=Mar 24 2006, 02:08 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 24 2006, 02:08 PM) [snapback]358017[/snapback][/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?
[!--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]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.