cannot connect mysql to php with vista
Posted: Mon Jun 09, 2008 6:07 am
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 .
But I am not getting it to work.
Can somone plz help me out.
Thanks
;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>Can somone plz help me out.
Thanks