PHP 4/5 Installation for Windows 7
I have a Windows 7 machine (64 bit) and another system with Windows Vista (32 bit). I have to look at PHP 4 / PHP 5 code (not sure which one it is exactly, is there a way to find out?). It's been a really long time since I installed it (used Apache but I don't remember what exactly I did during the installation!) What are some of the options I have so I can install PHP for coding and testing purposes locally on my machine.
The Windows 7 system does have IIS and I'm not sure if installing the .gz from the PHP website + allowing CGI type files for IIS does the trick?
And I still do not have to compile code changes for PHP (since it's interpreted + run on access), is this still correct?
I've been looking at some of the answers, like this one: PHP installation on windows (and Google searching) and now I'm really confused!
For starts, I just want to install PHP, and type in code and see what the code does (and debug if possible) on my local machine... Please give me detailed steps or links if possible. Worst case, I will have to look at links online that will do the processing for me instead of my server.
Update: I have installed Apache Http Server 2.2 (for Windows) and after installation also, typing into localhost points to IIS. Is there any way to swap between the two or do I have to configure PHP to be used with IIS only? also tried installing XAMPP and not able to start the Apache service (Port 80 says it has started to use the service so am not sure what's going on )
I also tried installing PHP for both Windows IIS as well as for Apache. First of all, Apache Web server doesn't go it's def开发者_StackOverflowault index page, IIS is still in play. Next, the PHP file behaves as if PHP was never installed, it opens the code as if we're viewing the code, not the functionality (in browser).
Like cwallenpoole mentioned, use XAMPP or WAMP, both being easy methods to install apache/php .etc on a windows machine.
After installing XAMPP, you can save your files to C:/xampp/htdocs (or wherever you chose to install xampp), they can then be viewed/ran by visiting http://localhost/ in your browser
Download and install Wamp or XAMPP. They are both standard Win. installs (no need for any compiling on your own). They will create a local Apache instance for you so you won't need to worry about IIS. Copy the code into the www folder (for wamp) or htdocs folder. (If it is PHP 4 code, for the most part it should still run in PHP 5.) Navigate to localhost/<code subfolder> and you'll see what happens when the code runs.
And yes, PHP does not need to be compiled except in extraordinary circumstances.
You could install PHP on windows using the Microsoft Platform Installer http://www.microsoft.com/web/platform/phponwindows.aspx
精彩评论