מדריך PHP קודם פרק 2. התקנה הבא The Windows PHP installer available from the downloads page at http: / /www.php.net /, this installs the CGI version of PHP and, for IIS, PWS, and Xitami, configures the web server as well. אזהרה You need to download the zip binary distribution from the downloads page at http: / /www.php.net /. אזהרה You will need to change the 'extension_dir' setting to point to your php-install-dir, or where you have placed your php_*.dll files. ex: c:\php\extensions Before you get started, you have a lot to download... For starters, get the Cygwin toolkit from the closest cygwin mirror site. This will provide you most of the popular GNU utilities used by the build process. Download the rest of the build tools you will need from the PHP site at http: / /www.php.net / extra / win32build.zip. Get the source code for the DNS name resolver used by PHP at http: / /www.php.net / extra / bindlib_w32.zip. If you don 't already have an unzip utility, you will need one. A free version is available from InfoZip. You can get the latest development version using anonymous CVS. If you get a snapshot or a source tarball, you not only will have to untar and ungzip it, but you will have to convert the bare linefeeds to crlf 's in the *.dsp and *.dsw files before Microsoft Visual C+ + will have anything to do with them. הערה: Place the Zend and TSRM directories inside the php4 directory in order for the projects to be found during the build process. Follow the instructions for installing the unzip utility of your choosing. Execute setup.exe and follow the installation instructions. If you choose to install to a path other than c:\cygnus, let the build process know by setting the Cygwin environment variable. On Windows 95 / 98 setting an environment variable can be done by placing a line in your autoexec.bat. On Windows NT, go to My Computer = Control Panel = System and select the environment tab. אזהרה Make a temporary directory for Cygwin to use, otherwise many commands (particularly bison) will fail. On Windows 95 / 98, mkdir C:\TMP. For Windows NT, mkdir %SystemDrive%\tmp. Make a directory and unzip win32build.zip into it. Sequentially change the dropdown to Executables, Includes, and Library files, and ensure that cygwin\bin, win32build\include, and win32build\lib are in each list, respectively. (To add an entry, select a blank line at the end of the list and begin typing). Typical entries will look like this: c:\cygnus\bin c:\php-win32build\include c:\php-win32build\lib Press OK, and exit out of Visual C++. Make another directory and unzip bindlib_w32.zip into it. For GUI users, launch VC++, and then select File = Open Workspace and select bindlib. For command line users, make sure that you either have the C+ + environment variables registered, or have run vcvars.bat, and then execute one of the following: At this point, you should have a usable resolv.lib in either your Debug or Release subdirectories. Copy this file into your win32build\lib directory over the file by the same name found in there. The best way to get started is to build the standalone / CGI version. For GUI users, launch VC++, and then select File = Open Workspace and select php4ts. For command line users, make sure that you either have the C+ + environment variables registered, or have run vcvars.bat, and then execute one of the following: At this point, you should have a usable php.exe in either your Debug_TS or Release_TS subdirectories. Repeat the above steps with php4isapi.dsp (which can be found in sapi\isapi) in order to build the code necessary for integrating PHP with Microsoft IIS. הערה: הערה: טבלה 2-1. קודם ראשי הבא למעלה