Apache+php+mysql installation Configuration Method Summary _php Tutorial

Source: Internet
Author: User
Tags tmp folder
The entire installation process is as follows:

1, first install Apache: I installed the version is: Httpd-2.2.16-win32-x86-openssl-0.9.8o.msi
Website: http://www.apache.org/dist/httpd/binaries/win32/
Apache installation and configuration is quite smooth, nothing to say.
Ways to change file paths:
In the file's installation directory, my is: D:\Program files\apache software foundation\apache2.2\conf, open httpd.conf Search: DocumentRoot "c:/web/ Apache/htdocs "Change the value to the publishing path you want, such as:
DocumentRoot "D:/www"
And then there's another place that needs to be modified.
Search: Directory "C:/web/apache/htdocs"
Modified to: Directory "D:/www"
This changes the file's publish path to D:www.

2, install PHP: version: Php-5.3.3-win32-vc6-x86

Website: http://windows.php.net/download/
Unzip the downloaded compressed package to d:php and rename the php.ini-development in the directory to php.ini
Open the php.ini and modify the following:
Search: error_reporting = E_all
Modified: error_reporting =e_all & ~e_notice
Here is the error reporting level, E_all is to report all errors, E_notice is the message that the report runs, such as variables that are initialized.
Search: Extension_dir = "./"
Modified: Extension_dir = "D:\php5\ext", configure the path of the extension library
Search:; extension=php_mysql.dll, remove the preceding semicolon: Extension=php_mysql.dll
Search:; extension=php_mysqli.dll remove the preceding semicolon: Extension=php_mysqli.dll
Search; Session.save_path = "/tmp", modify to an existing path, Session.save_path = "d:/mysql/session", or create a TMP folder in the Publish directory.
PHP Basic Setup Complete

3, configure Apache to load PHP

Open the Apachede installation directory, my is: D:\Program files\apache software Foundation\apache2.2\conf\extra, a new text file named: httpd-php5.conf, Open Add the following content
View Sourceprint? LoadModule php5_module "C:\web\php\php5apache2_2.dll"
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps
DirectoryIndex index.php
Phpinidir "C:\web\php"
Then open: C:\web\apache\conf\httpd.conf, add a line at the end of the file:
Include conf/extra/httpd-php5.conf
Restart Apache, Open Directory: D:\WWW, new file: index.php, enter content:
Phpinfo ();
?>
Use your browser to open http://localhost to test for successful installation
Fourth step: Install MySQL: Version mysql-5.1.49-win32
Website: http://dev.mysql.com/downloads/mysql/#downloads
After installation there is a configuration wizard, not very strict to follow which option to set, according to their own needs to set on the line, the impact is not big.
Combined with Apache and PHP, previously mentioned, here again, in the PHP installation directory to find PHP.ini, "; Extension=php_mysql.dll" before the ";" Remove and load the MySQL module. Save, shut down, restart Apache on the go.
Fifth Step: Install PhpMyAdmin
I am in the Chinese army software downloaded: http://www.onlinedown.net/soft/2616.htm
Unzip and put in the Publish directory, is the previous set of D:\WWW; change the config.default.php under the \libraries folder
Make the following changes:
1 Find password like next two lines
$cfg [' Servers '] [$i] [' user '] = ' root ';
$cfg [' Servers '] [$i] [' password '] = ';
Fill in your MySQL password to $cfg[' Servers ' [$i] [' password '] = '; Single quotes Inside
2 Search $cfg [' Pmaabsoluteuri '], set it to the PhpMyAdmin directory path, such as: http://localhost/phpMyAdmin/
The above practice does not know is not necessary, because I later changed back can also run.

Summary of issues encountered during configuration:
One, the installation of MySQL failed.
The general situation is that the previous MySQL uninstallation is incomplete. How can i uninstall MySQL cleanly? In a DOS environment
1. Stop MySQL service first: Stop mysql:net stop MySQL, or right-click "My Computer"-manage-service-find the MySQL service and stop.
2, uninstall C:\mysql\bin\mysqld-nt--remove under DOS
C:\mysql\bin\ is the specific path, want to completely remove MySQL, first end the MySQL process, and then uninstall MySQL.
An additional two DOS instructions are:
Start mysql:net start MySQL
Installation: C:\mysql\bin\mysqld--install//Note modify the specific path
3, delete the remaining MySQL files directly.
If you accidentally deleted all the MySQL files, and did not perform the above uninstall function, you can use the following method:
1, stop the MySQL service, Ibid. 1.
2. Manually delete the registry information:
Clear your MySQL service in the registration table (REGEDIT). There are several places: Hkey_local_machine\system\controlset001\services\eventlog\application\mysql directory deletion; Hkey_local_machine\system\controlset002\services\eventlog\application\mysql directory deletion; Hkey_local_machine\system\currentcontrolset\services\eventlog\application\mysql directory deletion;


Reboot.

Two, a problem occurred when connecting to the database:

"Because the connecting party does not respond correctly after a period of time or the connected host is not responding", I am in the test MySQL connection time appears
<textarea id="runcode74534"><?php Header ("content-type:text/html; Charset=utf-8 "); $link =mysql_connect ("localhost", root,605959); if (! $link) echo "Failed!"; else echo "Success!"; Mysql_close ();?></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
The reason is that MySQL parsing error, because the Hosts file is not defined, change localhost to 127.0.0.1 to show normal, or under C:\WINDOWS\SYSTEM32\DRIVERS\ETC, modify the Hosts file, Add 127.0.0.1 localhost.
PHP Configuration Environment (standard configuration) Word edition

http://www.bkjia.com/PHPjc/322185.html www.bkjia.com true http://www.bkjia.com/PHPjc/322185.html techarticle the entire installation process is as follows: 1, first install Apache: I installed the version is: Httpd-2.2.16-win32-x86-openssl-0.9.8o.msi website: http://www.apache.org/dist/httpd /binaries/win32/apa ...

  • Related Article

    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.