Welcome to my 3nd article on PHP4.COM..... This article will be rather short.. but help
users new to PHP or new to running it on the WIN32 platform (which is myself as well).
When it comes to running PHP for production environments, there is no other choice
in my opinion than running it on Linux, Solaris, etc. But for development, a lot of
users only have 1 primary machine and it's running Win32... I myself always use my
text mode Linux box for all development.. but recently when another user on
PHP4.com had difficulty running some code form a previous article on WIN32...
Having never run any PHP on Win32 before, a few user pointed me in the right
direction and I was able to get thing setup quite easily.
In this article we'll basically install PHP4, Apache 1.3.x.. I'm going to leave mysql out
of the installation here, because I already have it running on another machine, if you
wanted to install it as well, the links to the downloadable packages from this site,
have other packages with mySQL included in it.
Firstly visit: <a href="">http://www.firepages.com.au/phpdev4.htm </a>
Download the file "PHP4.06 / Apache1.3.20", now as you'll notice these versions of
software are slightly behind the latest release.. But for most people doing basic
development, and don't need any of PHP's new advanced features you should be ok.
Once downloaded, run the executable file. It will ask you where you want to extract
all the applications so. Just go with the default of C:\
Now if you look in the directory C:\phpdev you'll see a listing something like:
Code/Quote:
apache (Directory)
manuals (Directory)
mysql (Directory)
mysqlfront (Directory)
perl (Directory)
php (Directory)
www (Directory)
phpdev_start.bat (Batch File)
phpdev_stop.bat (Batch File)
PLEASE README.txt (File)
Now be sure to open and read the "PLEASE README.txt" file, it mentions a few
important things, one being if you had a pervious version of PHP installed, you
need to make sure you update the php.ini file.
Now open the file "phpdev_start.bat" with a text editor like notepad or WordPad.
You.ll need to comment out the 1st line, which tries to start mySQL, in most cases
you won't have mySQL. You could leave this line in, but it would generate an error
on startup.. So make the following changes:
Code/Quote:
start c:\phpdev\mysql\bin\mysqld-opt.exe
start c:\phpdev\www\yaks.html
cd c:\phpdev\apache
apache.exe -k start
-to-
REM start c:\phpdev\mysql\bin\mysqld-opt.exe
start c:\phpdev\www\yaks.html
cd c:\phpdev\apache
apache.exe -k start
This will prevent the 1st line from being executed. Now the moment of
truth... Run the phpdev_start.bat file. It will open a dos window, and also
launch a browser window. Things should all be running now. If you point
your browser to http://localhost/phpdev4/ , you should have a page load
up powered by apache/php. The real location of this page on the disk is:
C:\phpdev\www\phpdev4\index.htm
From that page, there a several links to show that php is working correctly.
Now your ready to start developing!
Make a directory called C:\phpdev\www\mysite\ , start by saving all your
files in that directory and access it using the URL: http://localhost/mysite
This install of PHP is actually quite good, it's got GD support if you want to
mess around with having PHP create graphics, graphs, etc on the fly..
very cool.. Along with mysql support.. so if you had mysql installed on
another machine, you could remotely connect to it easily.
Hopefully this article has given people a small glimpse into PHP on the
Windoze platform..