By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,856 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,856 IT Pros & Developers. It's quick & easy.

MySQL problem: Call to undefined function mysql_connect()

P: n/a
hello
i am not able to get mysql running.
you can get my server/php settings/details here:
http://damn-i-have.no-ip.com/phpinfo.php

i already enabled the following stuff in my php.ini

NOTE: i installed php to C:\php and got the ext dir in the install
dir.
extension_dir = "C:\php\ext"
extension=php_mysql.dll

i am still getting this error:
Fatal error: Call to undefined function mysql_connect() in C:\httproot
\mysqltest.php on line 2

i use this sorcecode:
<code>
<?php
$link = mysql_connect('localhost', '*****', '******');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
</code>
any ideas?

PS: mysql is running on standard port 3306 and i can access it with my
mysql query browser, with the user i use in php.

Jul 26 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Rik
On Thu, 26 Jul 2007 17:52:19 +0200, <lu******@gmail.comwrote:
hello
i am not able to get mysql running.
you can get my server/php settings/details here:
http://damn-i-have.no-ip.com/phpinfo.php

i already enabled the following stuff in my php.ini
Are you sure, the phpinfo() output doesn't reflect it? There may be
several php.ini's, the one currently in use is C:\PHP\php.ini. If that's
the one you altered, try restarting apache.

The rest seems OK.
--
Rik Wasmus
Jul 26 '07 #2

P: n/a
yes, i am editing C:\PHP\php.ini
and i already rebooted the whole system...

Jul 26 '07 #3

P: n/a
On Jul 26, 12:37 pm, lumo2...@gmail.com wrote:
yes, i am editing C:\PHP\php.ini
and i already rebooted the whole system...
is C:\PHP\php.ini in your environmental path?

Did you have to move a php.ini into your sys32 directory during
installation? If so (or if there is one there), overwrite that file
with the new(modified) file. Then, restart IIS.

-Steve

Jul 26 '07 #4

P: n/a
On Jul 27, 1:52 am, lumo2...@gmail.com wrote:
hello
i am not able to get mysql running.
you can get my server/php settings/details here:http://damn-i-have.no-ip.com/phpinfo.php

i already enabled the following stuff in my php.ini
--SNIP--

Your apache might not use that particular php.ini that you have edited
(or have mysql ext enabled).

To make sure that apache uses the correct
php.ini, add the following directive to apache conf

PHPIniDir "C:/PHP"

Replace C:/PHP to your php.ini directory.

Hendri Kurniawan

Jul 26 '07 #5

P: n/a
PHPIniDir "C:/PHP"

i already have that set (the php installer did that for me, and i
checked now for sure)
further i only have ONE php.ini on my whole system, so it cant load
anything else.
AND if i enable gd2 in my php.ini it gets loaded properly. if i enable
mysql nothing happens.
means phpinfo shows me that gd is loaded but nothing about mysql

and yes, my path is:
C:\PHP\;%SystemRoot%\system32;%SystemRoot%;%System Root%\System32\Wbem

any other ideas?

i can upload my php.ini and httpd.conf if needed

Jul 27 '07 #6

P: n/a
SOLVED!!!!

there was no libmysql.dll in my windows\system32 directory!
i downloaded it and put it there now its working

thanks for your help!

Jul 27 '07 #7

P: n/a
On 26 Jul, 21:27, ELINTPimp <smsi...@gmail.comwrote:
On Jul 26, 12:37 pm, lumo2...@gmail.com wrote:
yes, i am editing C:\PHP\php.ini
and i already rebooted the whole system...

is C:\PHP\php.ini in your environmental path?

Did you have to move a php.ini into your sys32 directory during
installation? If so (or if there is one there), overwrite that file
with the new(modified) file. Then, restart IIS.

-Steve
If he's using Apache, why would he want to restart IIS?

Jul 27 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.