After installing Apache and PHP, Apache and PHP each provide a text configuration file for users to flexibly configure at runtime.
1. Basic configuration of Apache server Enter the Apache configuration file directory. For Windows, open the httpd.conf file with Notepad in the C: wwwApache2.2conf directory, and for Linux, open the httpd.conf file in the/usr/local/apache/conf directory (for Linux, open it with vi). The basic configuration options are explained as follows.
2. Basic configuration of php Open PHP with NotepadWebsite constructionThe configuration file php.ini (opened with vi for Linux) is located in the PHP installation directory of Windows and/usr/1local/php/lib for Linux.
The configuration options are explained as follows.
Note: The above settings may be different from those on the reader's machine.
PHP file upload configuration The file upload configuration area can be found in the php.ini file. The configuration top selection is explained as follows.
PHP session configuration The Session configuration area can be found in the php.ini file. The configuration options are explained as follows.
Note: The above settings may be different from those on the reader's machine.
Email configuration for PHP In the php.ini file, you can find the e-mail configuration area. The configuration top selection is explained as follows.
PHP security settings In the php.ini file, this option plays an important role in script security. Here are some recommended configurations.
PHP debug settings At present, there are several PHP debuggers, such as xdbug, apd, etc. The debugger used in this article is Zend Debugger of Zend Company, which can be downloaded from//www.zend.comDownload to.
Zend Debugger is provided in the form of extension. According to different systems, download the Windows version or Linux version respectively. Here we explain the installation under the Windows system. The Linux system is different from the Windows system except for the extension files. The installation steps are the same as those of the Windows system.
(1) Unzip the downloaded compressed package "ZendDebugger - 5.2.6-cygwin_nt-i386. tar. gz", copy the "ZendDebugger. dll" file in the "5_2_x_comp" folder to the PHP extended directory, as shown in Figure 2.17.
(2) Edit the php. ini file and add the following lines at the end of the file.