Connecting Tech Pros Worldwide Help | Site Map

MySQL problem: Call to undefined function mysql_connect()

lumo2000@gmail.com
Guest
 
Posts: n/a
#1: Jul 26 '07
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.

Rik
Guest
 
Posts: n/a
#2: Jul 26 '07

re: MySQL problem: Call to undefined function mysql_connect()


On Thu, 26 Jul 2007 17:52:19 +0200, <lumo2000@gmail.comwrote:
Quote:
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
lumo2000@gmail.com
Guest
 
Posts: n/a
#3: Jul 26 '07

re: MySQL problem: Call to undefined function mysql_connect()


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

ELINTPimp
Guest
 
Posts: n/a
#4: Jul 26 '07

re: MySQL problem: Call to undefined function mysql_connect()


On Jul 26, 12:37 pm, lumo2...@gmail.com wrote:
Quote:
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

Hendri Kurniawan
Guest
 
Posts: n/a
#5: Jul 26 '07

re: MySQL problem: Call to undefined function mysql_connect()


On Jul 27, 1:52 am, lumo2...@gmail.com wrote:
Quote:
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

lumo2000@gmail.com
Guest
 
Posts: n/a
#6: Jul 27 '07

re: MySQL problem: Call to undefined function mysql_connect()


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

lumo2000@gmail.com
Guest
 
Posts: n/a
#7: Jul 27 '07

re: MySQL problem: Call to undefined function mysql_connect()


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!

Captain Paralytic
Guest
 
Posts: n/a
#8: Jul 27 '07

re: MySQL problem: Call to undefined function mysql_connect()


On 26 Jul, 21:27, ELINTPimp <smsi...@gmail.comwrote:
Quote:
On Jul 26, 12:37 pm, lumo2...@gmail.com wrote:
>
Quote:
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?

Closed Thread