Mysql can be configured to only allow connections from certain hosts, and it appears your host is not allowed. You need to talk to the mysql admin. Matt -----Original Message----- From: Jacob Bergman [mailto:jbergman@xxxxxxxxxxxxxxxxx] Sent: Monday, July 09, 2007 11:23 AM To: Janet Valade Cc: php-windows@xxxxxxxxxxxxx Subject: RE: Testing MySQL PHP connection Ok, so I put the two files into my system32 directory, which seems to have fixed the error I was getting... but wouldn't you know it, I know have 3 more... :( Warning: mysqli_connect() [function.mysqli-connect]: (00000/1130): Host 'PHP-AND-MYSQL.VMware.psd267.wednet.edu' is not allowed to connect to this MySQL server in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 13 Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 15 Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 18 Error: I have checked the hostname, user, and password in the php file, and they are all correct. Jacob Bergman Network Technician Pullman School District #267 (509) 432-4012 jbergman@xxxxxxxxxxxxxxxxx -----Original Message----- From: Janet Valade [mailto:jvalade@xxxxxxxx] Sent: Monday, July 09, 2007 9:17 AM To: Jacob Bergman Subject: Re: Testing MySQL PHP connection There error message means that the mysqli functions are not enabled. This means one of two things: (1) you did not activate the mysqli functions in php.ini by commenting the mysqli line. After editing php.ini, you need to restart your web server. Also, be sure you are editing the correct php.ini, as shown in the output of phpinfo(). (2) PHP cannot the find one or both of the files: php_mysqli.dll andlibmysqli.dll. The files must be located where PHP can find them. The simplest way is to locate them in a folder that is in your system path. If you added c:\php to your system path, copy them there. Or you can copy them to your windows\system32 folder. Janet Jacob Bergman wrote: > While trying to connect to the mysqll database with php, I use the > following file: > > > > <?php > > /* Program: mysql_up.php > > * Desc: Connects to MySQL Server and > > * outputs settings. > > */ > > echo "<html> > > <head><title>Test MySQL</title></head> > > <body>"; > > $host="PHP-AND-MYSQL"; > > $user="root"; > > $password="Britt9906"; > > > > $cxn = mysqli_connect($host,$user,$password); > > $sql="SHOW STATUS"; > > $result = mysqli_query($cxn,$sql); > > if($result == false) > > { > > echo "<h4>Error: ".mysqli_error($cxn)."</h4>"; > > } > > else > > { > > /* Table that displays the results */ > > echo "<table border='1'> > > <tr><th>Variable_name</th> > > <th>Value</th></tr>"; > > for($i = 0; $i < mysqli_num_rows($result); $i++) > > { > > echo "<tr>"; > > $row_array = mysqli_fetch_row($result); > > for($j = 0;$j < mysqli_num_fields($result);$j++) > > { > > echo "<td>".$row_array[$j]."</td>\n"; > > } > > } > > echo "</table>"; > > } > > ?> > > </body></html> > > > > When I access this file I I get "Fatal error: Call to undefined function > mysqli_connect() in C:\Program Files\Apache > Group\Apache2\htdocs\mysql_up.php on line 13" > > > > Not sure what is wrong... I'm pretty new to all this and grabbed this > out of a book. Thanks for the help! > > > > Jacob Bergman > > Network Technician > > Pullman School District #267 > > (509) 432-4012 > > jbergman@xxxxxxxxxxxxxxxxx > > > > -- Janet Valade -- janet.valade.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php