On Sep 26, 2008, at 4:33 PM, Xpert Advice wrote:
Bradley you are the best!! So I went to the page that u sent below
that has information specific to vista and now when i run the php
test page i actuall get a path!!!
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\php\php.ini
Yeah!!! but wait there's one last problem :-) .
Remember Im using Windows Vista, Apache2.2, Php5 and the latest
version of mysql. So im trying to load my test page for mysql in
the browser and I get a "this website cannot be displayed" error
HTTP 500. This is the test page that im running: ( not sure if
there's something wrong with the codes or if i have a new problem
now) Thanks in advance guys.
<?php
/* Program: mysql_up.php
* Desc: Connects to MySQL Server and
* outputs settings.
*/
echo "<html>
<head><title>Test MySQL</title></head>
<body>";
$host="localhost";
$user="root";
$password="Antigua";
$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>
Tianja Samuel-George
President
----- Original Message ----
From: Bradley Giesbrecht <[EMAIL PROTECTED]>
To: users@httpd.apache.org
Sent: Friday, September 26, 2008 11:01:43 AM
Subject: Re: [EMAIL PROTECTED] Not Sure If This Is An Appache Problem Or
a PHP problem
On Sep 25, 2008, at 9:57 PM, Xpert Advice wrote:
grrrrrrrr Ok that didnt work either. Moved it again to the
windows directory and restarted everything and still nothing. This
must be a bad trick that my computer is playing on me. Does it
have anything to do with windows vista? And yes I finally turned
off the user account control. Im pasting the original message
below in case we missed something.
Hello,
I am trying to test that php is working properly with apache and
with mysql and I keep getting the following error:
Fatal error: Call to undefined function mysqli_connect() in C:
\Apache2.2\htdocs\mysql_up.php on line 13
Now I have done absolutely everything that I have read in all of
these forums and it still is not working. Below is a list of all
that I have done so far:
1. Addded PHP to the windows path by going to "Advanced System
Settings" and adding C:/php to the path.
2. The php.ini file is currently located at c:/php/php.ini
3. I have tried moving the php.ini file to the windows folder
of my computer that didnt work.
4. I have removed the restrictive comment from the extension
php_mysqli.dll
5. I have re started apache several times.
6. Php in itself does seem to be working because I did create a
test php page and below is what shows up on that page. From what I
have read the fact that the loadedconfiguration file section is
blank means that my computer is not able to locate the php.ini file
but i honestly have no clue where else to put it because i've tried
copying it everywhere to no avail.
Please help if you can. Below is what I got from a test page when
i tested php alone on apache...however when i try to test if all
three are working i get the above error.
Tianja Samuel-George
President
----- Original Message ----
From: "William A. Rowe, Jr." <[EMAIL PROTECTED]>
To: users@httpd.apache.org
Sent: Friday, September 26, 2008 12:40:15 AM
Subject: Re: [EMAIL PROTECTED] Not Sure If This Is An Appache Problem
Or a PHP problem
Xpert Advice wrote:
> Ok time to start banging my head against the wall. So I turned
off the
> user account controls and tried everything again...still didnt
work.
> when i run the test page im still getting this:
>
> Configuration File (php.ini) Path C:\Windows
>
> Loaded Configuration File (none)
It went poof. It was actually stored in your account and only
appeared to
be in c:\windows. NOW put a php.ini in there.
This looks like a good vista walk-through for you.
http://senese.wordpress.com/2007/06/06/install-php-5-under-apache-22-and-windows-vista/
Hint, read the comments if you have problems.
Sorry, I didn't read your last post carefully. Ignore my last post.