Install PHP + MySQL + phpMyAdmin in Windows (APACHE)

Source: Internet
Author: User
Tags php server php website
Install PHP + MySQL + phpMyAdmin Apache in Windows (post)
PHP installation (directly decompress the version)
1. decompress the file to the disk you want to install,
Generally, we install it in the system disk directory. Change the directory name to PHP or PhP4. We recommend the PHP Directory name because it is useful. Because we have not installed other PHP versions.
2.
The PHP. ini-Dist file is renamed as PHP. ini. That is to say, delete the-Dist following it.
3. Rename the php. ini file and php4ts. dll file.
Copy the two files to the System32 directory under your system directory (X: \ windows \ system32). If it is 2000 or another one, Windows is winnt, there is always one of these two directories.
4. PHP installation is successful,
This is simple, and some plug-ins are not installed.
The following example shows how to install a common plug-in. Then you can install the new plug-in the future.
GD library Installation
1. Find the php. ini file we copied in the System32 directory.
. We can find a region where the text is:
; Extension = php_mbstring.dll
; Extension = php_bz2.dll
; Extension = php_c2.16.dll
; Extension = php_crack.dll
; Extension = php_curl.dll
; Extension = php_db.dll
; Extension = php_dba.dll
; Extension = php_dbase.dll
; Extension = php_dbx.dll
; Extension = php_domxml.dll
; Extension = php_exif.dll
; Extension = php_fdf.dll
; Extension = php_filepro.dll
; Extension = php_gd2.dll
; Extension = php_gettext.dll
; Extension = php_hyperwave.dll
; Extension = php_iconv.dll
; Extension = php_ifx.dll
; Extension = php_iisfunc.dll
; Extension = php_imap.dll
; Extension = php_interbase.dll
; Extension = php_java.dll
; Extension = php_ldap.dll
; Extension = php_mcrypt.dll
; Extension = php_mhash.dll
; Extension = php_mime_magic.dll
; Extension = php_ming.dll
; Extension = php_mssql.dll
; Extension = php_msql.dll
; Extension = php_oci8.dll
; Extension = php_openssl.dll
; Extension = php_oracle.dll
; Extension = php_cmd.dll
; Extension = php_pgsql.dll
; Extension = php_printer.dll
; Extension = php_shmop.dll
; Extension = php_snmp.dll
; Extension = php_sockets.dll
; Extension = php_sybase_ct.dll
; Extension = php_w32api.dll
; Extension = php_xmlrpc.dll
; Extension = php_cmdt.dll
; Extension = php_yaz.dll
; Extension = php_zip.dll
This is our PHP plug-in area. To install these plug-ins, remove the semicolon. For example, if we want to install the GD library, we will find the relevant information; Extension = php_gd2.dll
Remove the semicolon. Save PHP. ini.
2. Go back to the PHP installation directory.
. Find the relevant file php_gd2.dll In the extensions folder.
Then copy it to the System32 directory. Then our PHP supports our GD graphics library.
This is the plug-in installation.
Install Apche
1. First, make sure
Check if there are other servers on your computer that use port 80. If yes, disable all servers and then install Apche.
2. Go to the next step during installation
Enter the domain name, user name, and mailbox name. Next, the installation is successful automatically.

Configure Apche to support PHP
Modify the httpd. conf file in the conf directory of the Apche installation directory.
1. Find DocumentRoot.
Change the following path to your own website path
2. Find listen
Change port 80 to other numbers to increase security and prevent conflicts with other servers such as IIS.
3. Find # loadmodule ssl_module modules/mod_ssl.so
And add:
Loadmodule php4_module X: \ PHP \ SAPI \ php4apache2. dll
X indicates the drive letter installed in PHP.
PHP indicates the name of the PHP installation folder, which is generally PHP
4. Add the following statement at the end of the configuration file to support the PHP program:
ScriptAlias/PHP/"X:/PHP /"
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP. PhP4
Addtype application/X-httpd-PHP. phtml
Addtype application/X-httpd-PHP. php3
Addtype application/X-httpd-PHP-source. PHPs
Action application/X-httpd-PHP "/PHP/php.exe"
X indicates the drive letter installed in PHP.

5. Prevent Directory Access
To improve security, find options indexes followsymlinks and delete it to prevent directory access.
6. Set our default language,
By default, Apche is the western language of ISO. We want to change it to our simplified Chinese language.
Find adddefacharcharset ISO-8859-1
Adddefacharcharset gb2312
That is to change the ISO-8859-1 to gb2312
7. Find directoryindex
Add your default homepage file. For example, index. php
8. Create a text document and enter:
Phpinfo ();
?>
And save the file with the. php suffix (usually test. php) under the root directory of your specified website. In the browser, enter:

Http: // localhost: X/test. php

(X indicates the port number you specified)
This code is used to display the information of the PHP server. If it can be displayed, it proves that Apche + PHP is successfully installed.
Install MySQL and phpMyAdmin
MySQL installation:
1. Unzip the package and install it,
You can select a directory to install it, but it is best not to change the MySQL name. Next is OK. New users do not recommend anything.
Experience: the veteran can put the MySQL directory on another disk (not a system disk) to facilitate data loss during later installation of the operating system.
2. MySQL is successfully installed.
To run winmysqladmin.exe in the bin directory under the installation directory. The control panel of MySQL windows is displayed, and our MySQL service is started at the same time. You can enter your username and password. (This is the control panel password, not the management password of our MySQL database. Next we will talk about how to change the Database Password) then a red light icon is displayed in the taskbar. When the red light turns green, our MySQL service starts.
3. Change our database password.
After installation, the default password is null. We need to change it for security purposes. Our default Super User is root. I can also add it, but it is unnecessary for us to debug the local machine now.
First, Enter cmd to bring up the DOS window.
Again: Use our doscommand cd xx to enter the bin directory under our MySQL directory.
For example, X: \ mysql \ bin
Finally, run the following command:
Mysqladmin-u root-P password xxx
After entering the information, press Enter.
Xxx indicates the password you want to change.
On-screen prompt: Enter Password
It is for you to enter the previous password. If it is a new installation, it is null. If we do not lose anything, press enter to OK.
If no character is displayed, the password is changed successfully. If there are a lot of characters accompanied by a call, it proves that the error has occurred. If it is correct, only
X: \ mysql \ bin
All of our MySQL installation is complete.
PhpMyAdmin installation.
PhpMyAdmin is used to manage mysql. It has the functions of creating databases and tables. It is a standard management tool for MySQL. To put it bluntly, he is a PHP website and needs support from servers with PHP functions (such as IIS + PHP, Apche + PHP)
Decompress the package to the root directory of our website:
We can access it by entering an address.
This is mainly used to prepare our config file. Find the config. Inc. php file in the extracted file.
1. For details, refer to $ cfg ['pmaabsoluteuri '] = '';
Enter your website address in the middle of two single quotes. For example, the local debugging is:

Http: // 0.0.0.0: X/xxx

0.0.0.0 is your local IP address. For local debugging, enter localhost or 127.0.0.1.
X: port number.
XXX: indicates the directory or virtual directory where phpMyAdmin is stored. If it is under the root directory, it is not required.
2. find $ cfg ['servers'] [$ I] ['host']
$ Cfg ['servers'] [$ I] ['Port']
$ Cfg ['servers'] [$ I] ['user']
$ Cfg ['servers'] [$ I] ['Password']
Enter the two single quotation marks (=) in the middle.
Host is the host name, generally localhost
Prot is the port. Here we fill in, MySQL port 3306, all the same
User
Password
It is the user name and password, and the user name is generally root. The password you just changed. That's right. It seems that there are many places. It seems that there are three places. Wow, I forgot. You must follow these steps.
Then we can start to browse our phpMyAdmin, and then we will see our database management section, and then we can perform some operations.

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.