How to check if PHP was installed properly?

Confused_Girl

New Member
I have recently installed Apache, Php, and Mysql on my Windows XP computer. I was checking to see if Php works by using this code<?php<br />
phpinfo();<br />
?><br />
<br />
but it doesn't seem to work. The php file never opens successfully on Firefox nor IE, instead it only opens on Dreamweaver.<br />
<br />
I've used these websites for my installation<br />
http//www.php.net/downloads.php<br />
http//www.thesitewizard.com/archive/apache.shtml<br />
http//dev.mysql.com/downloads/index.html<br />
<br />
How do I know if I have properly installed PHP on my computer?<br />
<br />
Any help will be much appreciated. Thank you in advance!<br />
 

LeoSendra

New Member
Are you sure that you have put all of your php scripts in your htdocs folder???

Try to access this address from your browser http//localhost

If you can't access this address, try to check your service.
May the apache service or web server service is shut down..
 

daa

New Member
Assuming that you are able to open html pages on the local server -

First, make sure that your php code above is in a file with a .php extension (e.g. phpcheck.php.), in your webroot directory, and that you are accessing it with http//localhost/phpcheck.php.

Second, in your apache configuration file, make sure you have something like this

AddType application/x-httpd-php .php
 

Gruumsh

New Member
First, how exactly did you install these? Did you use the MSI installers? If so, that should have configured everything for you properly.

Also, I notice that you didn't get Apache from the apache site? You might want to check that one out... http//httpd.apache.org

Another route to go would be ONE program that sets up all three of these for you in one step, complete with controls in the system tray. Have a look here...

http//www.apachefriends.org/en/xampp-windows.html

Finally, just to verify... for you to see the OUTPUT from a PHP file instead of it opening in Dreamweaver, you have to open the file from your web browser, and it needs to be using the domain name or IP address configured for your server, NOT the file name. So the URL, assuming you named the file "info.php", should look like one of these...

http//localhost/info.php

http//127.0.0.1/info.php

These are both local loop-back addresses. If your server is on a LAN, then you might also be able to access it by using your Computer Name, or LAN address, such as...

http//MyComputer/info.php

http//192.168.0.3/info.php
 
Top