The PHP5 in the Windows environment is deep spaced @PHPE / text PHP5 published the third candidate version, and the estimated official version will soon release it. The installation process should not change. The following article content will tell Windows2000 / XP / 2003 (not recommended to establish a PHP environment under Windows 98), the server selects Apache 2.0.49, the database selection mysql 4.0.20 version . Need to download a few packages: 1. PHP5 RC3 2. Apache 2.0.49 3. MySQL 4.0.20 Download Package 1. PHP5 RC3 PHP download address is: http://www.php.net/downloads.php, Find the following image, download two packages in the square box. Among them, PHP 5.0.0RC3 Zip packages are PHP5 software packages, and Collection of PECL MODULES for PHP 5.0.0RC3 is a PHP5 PECL extension module set package. After the download is complete, put it on the C disk. 2. Apache 2.0.49 Apache official download address is: http://httpd.apache.org/download.cgi, find the following graph position, download the for Windows MSI installation package, saved in the C disc. 3. MySQL 4.0.20 mysql official download address is: http://dev.mysql.com/downloads/mysql/4.0.html, find the Windows Downloads section, download the WITHOUT Installer package and save it in the C drive, as shown below: Installing PHP5 assumes that your system is installed in a C drive, otherwise the following directory must be changed to the directory of the corresponding disk. Unzip the downloaded PHP5 RC3 (PHP-5.0.0.0RC3-WIN32.ZIP) to the C: / PHP5 / directory. Unzip all files in the PECL extension module package to the C: / PHP5 / EXT / Directory. Copy the php5ts.dll file under the C: / PHP5 / directory to C: / Windows / (if it is a Windows 2000 operating system, it is a C: / WinNT / Directory, the same, no repeated instructions). Copy the following DLL files in the C: / PHP5 / directory in the C: / Windows / System32 / Directory: fdftk.dll fribidi.dll gds32.dll libeay32.dll libintl-1.dll libmhash.dll libmysql.dll libmysqli.dll ntwdblib .dll ntwdblib.dll Yaz.dll where libmysql.dll is extended by the previous version of MySQL 4.1, libMysqli.dll is the extension support for the version of MySQL 4.1. Because I downloaded mySQL 4.0.20 above, it is actually replicating libmysql.dll.
Copy the php.ini-dist file under the C: / PHP5 / directory to the C: / Windows / Directory, and renamed it is php.ini, and open the editor with Notepad: Locate it two lines:; Directory in Which the loading Extensions (Modules) reside. EXTENSION_DIR = "./" The following line points to the C: / PHP5 / EXT / directory, the modification is as follows:; Directory in which the loadable extensions (modules) reside. EXTENSION_DIR = "C: / PHP5 / EXT / "Located below: Windows Extensions; Note That ODBC Support is Built IN, SO No DLL IS NEEDED For IT. You can see that all supported extensions are listed, we can remove the previous semicolons to make PHP supports the corresponding extension. I tested it, support the following extensions, or you can configure it according to the selection. extension = php_bz2.dll extension = php_cpdf.dll extension = php_curl.dll extension = php_dba.dll; extension = php_dbase.dll extension = php_dbx.dll; extension = php_exif.dll extension = php_fdf.dll extension = php_filepro.dll extension = php_gd2 .dll extension = php_gettext.dll; extension = php_iconv.dll; extension = php_ifx.dll extension = php_iisfunc.dll extension = php_imap.dll; extension = php_interbase.dll extension = php_ldap.dll extension = php_mbstring.dll; extension = php_mcrypt. dll extension = php_mhash.dll extension = php_mime_magic.dll extension = php_ming.dll; extension = php_mssql.dll; extension = php_msql.dll extension = php_mysql.dll; extension = php_oci8.dll extension = php_openssl.dll; extension = php_oracle.dll extension = php_pdf.dll; extension = php_pgsql.dll extension = php_shmop.dll extension = php_snmp.dll extension = php_sockets.dll; extension = php_sybase_ct.dll extension = php_tidy.dll; extension = php_w32api.dll extension = php_xmlrpc.dll extension = PHP_XSL.DLL; EXTENSION = php_yaz.dll extension = php_zip.dll saves files and exits.
Install Apache 2.0.49 Ready to download Apache_2.x.x-Win32-x86-NO_ssl.msi. Start the installation after double-click. One step next, agree to the license agreement, there will be a page that fills in the server information, local debugging, two input localhost. As follows: All the way next, install the default path - Of course, you can also choose the path you need. Apache will automatically install and launch relevant services. And run an Apache monitor in the lower right corner of the taskbar: We can restart, stop, start Apache service from this monitor. Double-click the small icon to open the control interface: Next to configure the Apache's configuration file, open the c: / program files / apache group / apache2 / conf / Apache group / apache2 / conf / (I am using the default installation path installation, follow yourself Install the path to the corresponding change) The httpd.conf file in the directory, positioned below: DirectoryIndex index.html index.html.var Add a PHP default page after it, usually index.php, as follows: DirectoryIndex INDEX. HTML index.html.var index.php In order to make Apache's related extensions, search and locate this section: Allowoverride None Options None ORDER Allow, Deny Allow from ALL
Add the following two lines: addtype application / x-httpd-php .php .phtml .php3 .php4 addtype application / x-httpd-php-source .phps Specify the PHP module, find and position it to this line: #LoadModule SSL_Module Modules / MOD_SSL.SO Add a line below: loadModule PHP4_Module C: /PHP5/php5apache2.dll makes it point to the php5apache2.dll file under the PHP5 directory, and the path must be accurate. In order to specify Apache recognition Chinese, we specify that GB2312 is the default code. It should be found and positioned below AddDefaultCharset ISO-8859-1 to modify it to: AddDefaultCharset GB2312. In addition, if you want to ban directory browsing, find and locate these lines:
# ... # Some comments # ...... Options Indexes FollowSymlinks Removes a few lines of comments below INDEXES that followed, after modifying:
# ... # Some comments # ... Options FollowSymlinks OK, save the httpd.conf file and follow the Apache server. Install MySQL 4.0.20 Press the mysql-4.0.20-win-noinstall.zip folder to the root directory of the C drive (Note: Use this version mysql must put the decompression file folder in the root directory of the C drive), After compression, you can find a folder called MySQL-XXX under the Circuits directory. The name is named mysql. Enter the bin directory, find the winmysqladmin.exe file, open it. The first run will prompt to enter a new username and password. Here you can choose the username and password input you need, as the default user name and password of My.ini. As shown below: After clicking OK is determined, WinMysqladmin will narrow down to the task bar in the lower right corner: Let's take a look at whether the mysql service is started. Open "Control Panel" and open "Management Tool" and open "Service". If everything goes well, we will see the information that mysql has started, as shown below: The installation of MySQL here is very simple. Test whether PHP is configured successfully: Open Notepad, enter this line code: Save as phpinfo.php file, store it in the apache2 / htdocs / directory, remember to save the type "All files", as shown below: OK Open the browser, type in the address bar: http://localhost/phpinfo.php and enter, if everything goes well, you will see the following page, to this PHP5 configuration, you will tell: Note: This article does not start from security And performance to discuss the configuration of the server, please refer to other manuals for the corresponding security configuration. This article only provides the configuration of the PHP5 environment. As a premise for learning PHP5, this article cannot be used as a server configuration article. For example, here is not setting mysql The root user password will result in a large security riser, so please set it yourself by the reader. The author's profile (Shenkong), studying the electronic information engineering of Xi'an University of Electronic Technology University, love PHP. Personal Homepage: www.openphp.cn, contact mail: kim@openphp.cn