Apache installation tutorial

Source: Internet
Author: User
Tags install php ini php tutorial tmp folder win32 phpmyadmin

1, first install apache: My installed version is: httpd-2.2.16-win32-x86-openssl-0.9.8o.msi
Web: http://www.apache.org/dist/httpd/binaries/win32/
The installation and configuration of apache are smooth.
How to change the file path:
In the installation directory of the file, my directory is: d: program filespache software foundationpache2.2conf, open httpd. conf search: documentroot "c:/web/apache/htdocs" to change the value to the desired release path, for example:
Documentroot "d:/www"
There is another one that needs to be modified.
Search: directory "c:/web/apache/htdocs"
Change to directory "d:/www"
In this way, the file publishing path is changed to d: www.

2, install php Tutorial: version: php-5.3.3-win32-vc6-x86

Web: http://windows.php.net/download/
Decompress the downloaded package to d: php, and rename php. ini-development under the Directory to php. ini.
Open php. ini and modify it as follows:
Search: error_reporting = e_all
Modify: error_reporting = e_all &~ E_notice
Here, the error report level is changed. e_all is the report of all errors, and e_notice is the message to be noticed during the report runtime, such as the initialization variable.
Search: extension_dir = "./"
Modify: extension_dir = "d: php5ext" to configure the extension library path.
Search:; extension = php_mysql tutorial. dll, remove the semicolon: extension = php_mysql.dll
Search:; extension = php_mysqli.dll remove the semicolon: extension = php_mysqli.dll
Search; session. save_path = "/tmp", changed to an existing path, session. save_path = "d:/mysql/session", or create a tmp folder under the release directory.
Php basic settings complete

3. Configure apache to load php

Open the installation directory of apachede, my is: d: program filespache software foundationpache2.2confextra, create a text file named: httpd-php5.conf, open add the following content
View sourceprint? Loadmodule php5_module "c: webphpphp5apache2_2.dll"
Addtype application/x-httpd-php. php
Addtype application/x-httpd-php-source. phps tutorial
Directoryindex index. php
Phpinidir "c: webphp"
Open c: webpacheconfhttpd. conf and add a line at the end of the file:
Include conf/extra/httpd-php5.conf
Restart apache, Open Directory: d: www, create File: index. php, input content:
<? Php
Phpinfo ();
?>
Open http: // localhost in the browser and test whether the installation is successful.
Step 4: install mysql: version mysql-5.1.49-win32
Web: http://dev.mysql.com/downloads/mysql/#downloads
There is a configuration wizard after installation, which does not strictly follow which option to set, just set according to your needs, the impact is not big.
It is used in combination with apache and php, as mentioned earlier. Here we will talk about how to find php in the php installation directory. ini, remove ";" before "; extension = php_mysql.dll", and load the mysql module. Save and shut down. Restart apache.
Step 5: install phpmyadmin
Http://www.onlinedown.net/soft/2616.htm I downloaded from Huajun software
Decompress the package to the release Directory, that is, the previously set d: www; change config. default. php in the libraries folder
Make the following changes:
1. There are two rows for searching for the password:
$ Cfg ['servers'] [$ I] ['user'] = 'root ';
$ Cfg ['servers'] [$ I] ['password'] = '';
Enter your mysql password in $ cfg ['servers'] [$ I] ['password'] = ''.
2. Search for $ cfg ['pmaabsoluteuri '] and set it to the phpmyadmin directory path, for example, http: // localhost/phpmyadmin/
The above practice does not know if it is necessary, because it can also be run after I change it back.

Summary of problems encountered during configuration:
1. Failed to install mysql.
Generally, the previous mysql uninstallation is incomplete. How can I clean and uninstall mysql? In a dos environment
1. stop the mysql service first: stop mysql: net stop mysql, or right-click "My Computer"> "manage"> "service" to find the mysql service and then stop it.
2. Uninstall c: mysqlinmysqld-nt -- remove under dos
// C: mysqlin is the specific path. To completely delete mysql, end the mysql process and then uninstall mysql.
The following two dos commands are attached:
Start mysql: net start mysql
Install: c: mysqlinmysqld -- install // modify the specific path
3. Delete the residual mysql files directly.
If you accidentally delete all mysql files and have not previously executed the above uninstall function, you can use the following method:
1. Stop the mysql service.
2. Manually delete the registry information:
Clear your mysql service in the registry (regedit. There are several points: deleting the inventory directory; deleting the hkey_local_machinesystemcontrolset002serviceseventlogpplicationmysql directory; deleting the hkey_local_machinesystemcurrentcontrolsetserviceseventlogpplmysql directory;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.