faqts : Computers : Programming : Languages : PHP : Installation and Setup : PHP4

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 14 people (50%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How can I view my own php files on my Windows XP computer?Do I need a software?Don't own a web host.

Jul 15th, 2002 16:31
Kelson Vibber, Rafael Fernandez, http://www.php.net/manual/en/install.windows.php


For most practical purposes, you need a web server to test your PHP
pages.  However, you can install one on your own computer 
If you have Windows XP Professional, it includes a version of Internet
Information Services.  Make sure IIS has been installed, then install
PHP according to the directions at
http://www.php.net/manual/en/install.iis.php (also available in several
other languages).
I don't think Windows XP Home Edition includes IIS at all, so you will
probably have to download a web server.  A good free one is Apache.  You
can download the Windows binary from http://httpd.apache.org/ .  Be sure
to check any notes they have about Windows XP compatibility!  You can
use either the CGI method (which is more complicated to configure
safely) or the SAPI method (which is much simpler to set up), but PHP's
support for Apache 2 in SAPI is still considered beta, so if you want to
use Apache 2 you should use the CGI method, and if you want to use the
SAPI method you should use Apache 1.3.  (This will, of course, change in
the future.)  Directions for installing PHP with Apache are at
http://www.php.net/manual/en/install.apache.php (again with links to
other languages).
If you don't want to install a web server, and you're willing to go
through a little trouble every time you change something, *and* you
don't use any forms on your site, you can do the following:
1. Open up a command prompt (assuming those still exist in WinXP).
2. Type "path-to-php.exe yourpage.php > yourpage-test.html"
   For example:
       c:\php\php.exe index.php > index-test.html
3. Open the test page in a web browser.