473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

MySQL problem: Call to undefined function mysql_connect()

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
7 3384
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
yes, i am editing C:\PHP\php.ini
and i already rebooted the whole system...

Jul 26 '07 #3
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: das dsf | last post by:
Hi there! I have both PHP 4.0( RPM) installed and MySQL 4.0.20 installed with the mysqld daemon up and running. But when I look at the output of phpinfo() , I do not see it there, which is...
0
by: W i l l | last post by:
I have Apache 2 parsing and serving PHP files just fine on my winXP box, however, when I try to add some mysql database functionality I get a warning that looks like this: Fatal error: Call to...
5
by: ligerdave | last post by:
i run php4+mysql+apache2 on linux(ubuntu). every time i try to use mysql_connect function, it says something like this: Fatal error: Call to undefined function: mysql_connect() in...
4
by: gregsands | last post by:
Hi I have read all (ok most) of the posts relating to "Call to undefined function mysql_connect()", read the manual on PHP.net and done eveything thats ive been asked to do but cant get PHP to...
3
by: Martin | last post by:
I'm having trouble getting a new PHP/MySQl installation to work. Windows XP Pro, IIS 5.1, PHP 5.1.1, MySQL 5.0.16, ISAPI This is a new computer. The whole setup is for development use only -...
6
by: Mike | last post by:
I'm new to MySQL. I have a copy of MySQL on my PC but it appears the only way to create a database is through a shell. I have a copy of MySQL-Front but I can't get it to connect to the...
7
by: Kurda Yon | last post by:
Hi everybody, I cannot understand the following thinks. The last line of the fillowing code produces a message about mistake (not a valid MySQL- Link resource): $link = mysql_connect(...
9
by: christopher_board | last post by:
Hi all. I am trying to connect to a MySQL Database using PHP on a local machine using locahost. I am using the following code <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass =...
11
by: Kurda Yon | last post by:
Hi, I got this warning: mysql_query(): 4 is not a valid MySQL-Link resource. The line which cause this warning is: mysql_query("insert into $tablename (id,priority) values('$id', '0.00')",...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.