|
-
Feb 17th, 2006, 01:40 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] mysql_connect issue
When I try to connect to mysql using the mysql_connect function it gives me this error: "Call to undefined function mysql_connect()" I have already remove the semi-colon in line extension=php_mysql.dll in php.ini. What would be the other possible reasons behind this case?
thanx a bunch for the help.
-
Feb 17th, 2006, 03:37 AM
#2
Frenzied Member
Re: mysql_connect issue
mar zim:
It would sure be a lot easier to try and help you if you would post the code you are using to try and connect.
I assume your mysqsl_connect() function is something like:
mysql_connect('localhost', 'username', 'password'); If so, then, depending on your other code, it should work.
Sounds like you just installed MySQL.
Do you know if MySQL is running?
Can you access it from the command line?
Without seeing your code, I guess I don't have any more suggestions.
Good Luck.
-
Feb 17th, 2006, 03:45 AM
#3
Thread Starter
Frenzied Member
Re: mysql_connect issue
ok. I can connect using in the dos prompt.
my code something like.
PHP Code:
<?php
$link = mysql_connect('localhost','root','password');
if(!$link){
die('Could not connect:'. mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
edit: username=root;password=password;
-
Feb 17th, 2006, 06:21 AM
#4
<?="Moderator"?>
Re: mysql_connect issue
Ok the error is that the specific function cannot be found, now have you checked to make sure that the extension path is correct?
Code:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "ext"
If the path is correct and the DLL is simpley not their then you can download it, as well as others from the PHP site, Collection of PECL modules for PHP 5.1.2
Btw version of PHP are you using 4 or 5?
-
Feb 17th, 2006, 07:11 AM
#5
Re: mysql_connect issue
Make a page that only contains
<?php phpinfo(); ?>
and see if mysql appears among the extensions.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 18th, 2006, 02:51 AM
#6
Thread Starter
Frenzied Member
Re: mysql_connect issue
Thanks guys for all reply. I just uninstall PHP and install it again. Now it works maybe I just missed some configuration.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|