Home > Backend Development > PHP Tutorial > PHP5214 and apache2216 installation and configuration methods in windows Page 1/2

PHP5214 and apache2216 installation and configuration methods in windows Page 1/2

WBOY
Release: 2016-07-29 08:43:46
Original
1195 people have browsed it

First download the configuration files that need to be installed
1, apache-2.2.16
2, php-5.2.14-Win32

1. Apache configuration

I won’t talk about the installation of apache. During the installation process, choose what you want to install. Location, just go all the way next. The default port is 80. After the installation is completed, enter http://localhost/ in the browser for verification. If successful, It works! Apache configuration: The configuration file is located in %APACHE_HOME%confhttpd.conf in the installation directory. Modify the root directory DocumentRoot (Two places in total). The port is also modified here.

2. PHP configuration

Unzip the downloaded php-5.2.14-Win32.zip. Be careful not to download the debug or none-thread-safe version of php when downloading. Otherwise, an error will occur after combining with apache.

Copy the decompressed php.ini-dist as a backup, then rename the original php.ini-dist to php.ini, open the file, and configure it.

1. Set the extension location:

extension_dir = "%PHP_HOME%/ext"

(To enable this setting after modification, remove the preceding semicolon, %PHP_HOME% is the decompression directory of php) 2. Open the required Extension: Remove the semicolon in front of

extension=php_bz2.dll, extension=php_gd2.dll, extension=php_mysql.dll, extension=php_mysqli.dll

(note that there can be no spaces in front). If you want to open other extensions, then Remove the semicolon in front of other extensions. 3. Time difference problem: Find

                                                                 date.timezone =                                                         , in

#LoadModule vhost_alias_module modules/mod_vhost_alias.so

Enter the following line:

LoadModule php5_module E:/php/php-5.2.14-Win32/php5apache2_2.dll

PHPIniD ir "E:/php /php-5.2.14-Win32"

AddType application/x-httpd-php .php .phtml

Explanation:

The first line is the location of the dynamic link library needed to combine php with apache. This file is in In the root directory after php is decompressed.

The second line is the path to the php.ini file

The third line tells the browser to forward the .php.phtml file to apache for parsing.

Restart Apache so that it can be associated with php. (Note that you must restart Apache every time you modify the Apache or PHP configuration file)
You should encounter garbled characters, and continue to add when you encounter them. PS: Sure enough, I encountered garbled code. I used Eclipse for PHP Developers for development. In the preferences, the workspace encoding is set to utf-8 by default, but when the php or html page does not contain current page 1/2 12 next page

The above introduces the 1/2 page of the installation and configuration method of PHP5214 and apache2216 in Windows, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template