- Loadmodule php5_module d: \ php5 \ php5apache2_2.dll
2. you can modify the documentroot parameter to modify the root directory of the server's main document. the original root directory is apache2.2 \ httdocs. For example, after modifying the documentroot parameter of documentroot "d:/phpserver", you need to modify the following:
- To:
- Apache2.2 \ httdocs
3. add the apache server extension: find the following code:
- Allowoverride none
- Options none
- Order allow, deny
- Allow from all
Add addtype application/x-httpd-php. php to the end of this code. the extensions that php can recognize include php3,. php3, php, and phtml. Only the standard extension. php is recommended.
4. modify the preview display page, and the apacheparts display page is index.html. Find the directoryindex and modify the parameters as follows:
- Directoryindex index. php
5. modify the apaceh Port. the default value is 80. find listen and modify the parameters. if you want to modify the port to 82: listen 82, restart the apaceh server. However, to display php webpage files, it still does not work.
Install php 1 and decompress the php5 installation file to the corresponding directory. For example, d: \ hph5. 2. copy all dll files under this directory (php5 directory) to the windows \ system32 directory on the system disk. 3. copy the php. ini-dist file in the directory to the system disk \ windows directory and rename it php. ini. 4. open the php. ini diploma and find "extension_dir ="./"and change it to" extension_dir = "d:/hph5/ext "". 5. locate the line "; extension = php_mysal.dll" and remove the semicolon. In this way, php supports the mysql database. 6. now, php is configured and the apache server is restarted.
Test: compile a php script file named phpinfo. php and save it to the virtual root directory d:/phpserver of the apache server. Php script file code:
- Phpinfo ();
- ?>
Test: enter http: // localhost/hphinfo. php in the address bar of the browser. if the php version information is displayed, the php server is successfully set up. Php and mysql server configuration instructions php Server Status Check implementation code php method for getting server time php method for getting server information alternative method php method for getting server information a piece of code for getting server information |