Windows Apache MySQL PHP phpmyadmin

Source: Internet
Author: User
Tags install php php file upload tmp folder phpmyadmin web database

Windows7 under Php+mysql+apache+phpmyadmin

This is I copy from, because fixed my phpmyadmin, so reproduced, the original article see: http://blog.sina.com.cn/s/blog_6876deb201019ysu.html

These two days because I want to write a PHP environment configuration of the document, so I re-configure the environment again. The document is written in detail and is almost one step ahead. In this period also refer to some online information, but reproduced or please indicate the source, the following.   the software you need
    1. php-5.4.8
    2. Apache2.2
    3. Mysql 5.2.44
    4. phpMyAdmin
Other versions are also available.

Software:

    • Apache http://httpd.apache.org/
    • Mysql http://www.mysql.com/downloads/mysql/
    • PHP http://php.net/downloads.php
    • phpMyAdmin http://www.phpmyadmin.net/home_page/downloads.php
Be ready to install before you can start the installation process.

I. installing Apache

1. The compressed package Ttpd-2.2.22-win32-x86-openssl-0.9.8t.zip (the name varies by version, I will not repeat below) after extracting, open the executable program in the file.

2.

Click Next.

3.

Next

4.


Next.

5.

If you want to connect to the Internet network domain and server name write the corresponding service information, if just as a stand-alone can be entered casually, but not empty, you can generally enter localhost; Apache default port is number 80th, you can choose a different port depending on your needs.

6.

Here choose the type of installation, can be a typical installation can also be their own manual selection, can choose by themselves, generally choose typical. Next, click Next directly

7.


Next.

8.

Start the installation. 9.
Installation is complete.

Two install PHP

1. When I install PHP, I choose to have PHP code package, can download directly from the official website, unzip the file name php-5.4.8-win32-vc9-x86 to PHP. and put the file location you want to put in. For example, I chose the path in the Phpserver file under the D drive to be D:\PHPServer \php.

2.php Configuration

Locate the PHP installation file that will be the file in the php.ini-development file. (On my computer, the path is D: \phpserver\ php\php.ini-developmen) The name is changed to PHP.ini, and the php.ini file is opened.

3. found in php.ini

; On Windows:

; extension_dir = "ext"

About 729 lines ;

Change it to (don't forget to remove the semicolon before Extension_dir):

; On Windows:

Extension_dir = "d:/phpserver/php/ext/"

The path is the path of the ext folder below your PHP file , modified according to your own path.

4. Find the following sentence, remove the preceding semicolon (function as open extension function)

Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_pdo_mysql.dll
Extension=php_pdo_odbc.dll
Extension=php_xmlrpc.dll

5. Configure Session

Find

; Session.save_path = "/tmp"

Remove the preceding semicolon, and change the "/tmp" back to the path you saved the session to, you can create a folder yourself.

For example , I created a TMP folder under the D:\PHPServer\ path to save the session, so I changed it to :

Session.save_path = "D:/phpserver/tmp"

6. Configure the php file upload function

Found it

; Upload_tmp_dir =

Remove the previous semicolon and change it to the path of the temporary Save folder for the upload file.

For example, I selected the location or in the tmp folder (you can also choose a different folder), so I modified to:

7. Configure the php time zone

Found it

;d Ate.timezone =

To get rid of the preceding semicolon, I chose UTC (You can also choose a different time zone), so the change is:

Date.timezone = UTC

three . Configuration Apache

Locate the httpd in the Apache installation file . Conf open, path to Apache software foundation\apache2.2\conf\

1.

Found it

#LoadModule Vhost_alias_module modules/mod_vhost_alias.so

Under it, add the following:

LoadModule php5_module " d:/phpserver/php/php5apache2_2.dll"
Phpinidir "d:/phpserver/php"
AddType application/x-httpd-php. php. html. htm

In the PHP directory there are multiple Php5apache dll files, because this is the use of Apache2.2, so select Php5apache2_2.dll, and then specify The installation directory of PHP and the program extension to be executed.

where d:/phpserver/php is the PHP installation path

2.

Apache Server Execution Web main program directory default to Apache2.2/htdocs, because this folder location is not very convenient, so we can change the directory, my D:\PHPServer\www, modify the method as follows:

Found it

DocumentRoot "D:/program Files/apache software Foundation/apache2.2/htdocs"

Revision changed to

DocumentRoot D:\PHPServer\www

Of course the location of the folder depends on you.

Found it

<directory "D:/program files/apache software Foundation/apache2.2/htdocs" >

Revision changed to

<directory "D:\PHPServer\www" >

3. Modify the specific index file order

Found it

DirectoryIndex index.html

Revision changed to

DirectoryIndex index. PHP index.html

4. To this step Apache configuration Even if it is already completed, restart Apache

Create anew file under D:\PHPServer\www \ folder index.php

in which to write

<?php

Phpinfo ();

?>

Open Browser input localhost if any of the following are unsuccessful

Apache startup Common error is that Port 80th is occupied (such as Thunderbolt,SII, etc.), you can shut down the software and restart.

Four installation MySQL

1. Open MySQL installer and click Next. Start the installation (some pictures are not posted)

2. Installation Successful Start Configuration Setup Wizard

Click Nxet until it appears

Select Default Click Next

Select Server machine, others are optional, but if just as a Web database, the second option is recommended. Click Next


ClickNext you can choose according to your needs
Choose the location of the file to be decided by yourself. ClickNext

Select the number of concurrent connections, the first one for20, the second is 500, and the third is a custom one. It's up to you to choose, but usually you choose the first one. Click Next
Select the port for the database, and select the default port generally. ClickNext

Select a character set. It is recommended to use UTF8. Decide by yourself

Select asWindows Services, the default name is MySQL (can be changed). There may be a number one conflict with MySQL on the computer.


Enter the root user password


Click Execute to finish. I was stuck in the second step of this step when I installed it, because a part of it was because I had previously installed MySQL. You only need to change the MySQL configuration file My.ini to resolve the issue. If the startup service below appears to be unsuccessful then there can be a MySQL service that originally existed in the computer.

3. Verify that the database is installed successfully

Turn on MySQL in cmd input net start MySQL open mysql (cmd Run as Administrator)

If Apache is not turned on , enter the net start apache2.2 in cmd

Write in the php file index.php file that you just created

<?php

$connect =mysql_connect (' 127.0.0.1 ', ' root ', ' database Password ');

if (! $connect) echo ' Connection failed ! ';

else echo ' connection succeeded ';

Mysql_close ();

?>

Open Locahost in the browser and the configuration is complete if the output is "connected successfully".

V. phpMyAdmin Installation

MySQL has a lot of graphical interface, but the web version of the phpMyAdmin is more convenient (you can also choose other graphical interface). The configuration of the following phpMyAdmin .

1. after extracting the Phpmyadmin-3.5.3-all-languages.zip, name the folder inside:phpMyAdmin

2. Put the file phpMyAdmin into the Web root, I put it under D:\PHPServer\www

3. Then configure the config.default.php file under the Directory libraries file .

  $cfg [' pmaabsoluteuri '] = ' http://localhost/phpmyadmin ';

$cfg [' Servers '] [$i] [' host '] = ' localhost ';

  $cfg [' blowfish_secret '] = ' 123456 ';//set by yourself

$cfg [' defaultlang '] = ' zh-utf-8 ';

  $cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';

$cfg [' Servers '] [$i] [' password '] = ' your password ';

4. Complete the configuration

Enter http://localhost/phpmyadmin/in the browserand the configuration is successful if the output is as follows



OK, now the configuration is done.

Windows Apache MySQL PHP phpmyadmin

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.