Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking if PHP is installed correctly

Status
Not open for further replies.

y2k1981

Programmer
Aug 2, 2002
773
0
0
IE
How I can I check if PHP is installed correctly? I've also installed mySQL, how can I check if they're "communicating"? Do I have to copy the php.exe from the PHP folder to the winnt or winnt\system32 (I'm using NT4 incase you didn't guess!) so that I can type php at the command prompt or do I have to include the PHP folder in my DOS path? I did write a basic PHP file last night with just the following and it worked:

<?php

$var = &quot;hello world&quot;;

echo $var;

?>

but that's not using a mySQL so I just want to make sure everythings A-OK!

Thanks
:)
 
use this page, mos the username and password to suit.

It will either:
show you an error number and reason or confirm a good connection.

<?php
$user=&quot;root&quot;;
$pass=&quot;password&quot;;
$host=&quot;localhost&quot;;

@mysql_connect($host,$user,$pass);
if(mysql_errno() > 0 ){
echo &quot;<h1>Error number : &quot; . mysql_errno() . &quot;</h1><br>&quot;;
echo &quot;<b>&quot; . mysql_error() . &quot;</b>&quot;;
}else{
echo &quot;successful connection&quot;;
}

?> ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
create a php doc.
in it include this :
<?
php_info();
?>

This will print a page readout of your PHP system.
 
Thanks KarveR - it worked.

moth! I had actually done this also, I didn't realize this would tell me it was communicating with mySQL though.

Well, thank you both!!

[wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top