cannot connect mysql to php with vista

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
dids223
Forum Newbie
Posts: 2
Joined: Mon Jun 09, 2008 5:57 am

cannot connect mysql to php with vista

Post by dids223 »

I cannot connect mysql to php. I have managed to get it setup to display phpinfo but it does not show the mysql on it. i have done a php.ini file in the c:\php and made the extensions available and also do the path in the Environment Variables to %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\MySQL\MySQL Server 5.0\bin;c:php

;extension=php_mime_magic.dll
;extension=php_ming.dll
extension=php_msql.dll
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll

then I created a php to test it .

Code: Select all

<html>
 
<head>
 
<title>Apache is the Best!</title>
 
</head>
 
<body>
 
<?php
 
 
 
 
mysql_connect("localhost", "root", "bollocks") or die(mysql_error());
 
mysql_select_db("test") or die(mysql_error());
 
$query = mysql_query("SELECT * FROM people") or die(mysql_error());
 
 
 
 
while($data = mysql_fetch_array( $query )) {
 
Print "<p>Name: ".$data['name'] ."<br>" ."Likes: ".$data['likes'] . " </p>";
 
}
 
 
 
?>
 
 
</body>
 
</html>
But I am not getting it to work.
Can somone plz help me out.
Thanks :D
dids223
Forum Newbie
Posts: 2
Joined: Mon Jun 09, 2008 5:57 am

Re: cannot connect mysql to php with vista

Post by dids223 »

I'll just mention what versions iam using.

php-5.2.6-Win32
mysql-5.0.51b-win32
apache_2.2.8-win32-x86-openssl-0.9.8g

On vista 32x Ulitmate

hope this helps
Post Reply