php5.6 + apache2.4+mysql5.7 Configuration

Source: Internet
Author: User
Tags configuration php mysql client phpinfo zip mysql gui

-----------------------------------------------------

★ Software tools: (download note download the corresponding version, different version of the installation details may vary!!) )

1>httpd-2.4.18-win64-vc14.zip:http://www.apachelounge.com/download/

2>php-5.6.16-win32-vc11-x64.zip:http://windows.php.net/download/

3>mysql-5.6.29-winx64.zip:http://dev.mysql.com/downloads/mysql/

4> mysql-front:http://www.mysqlfront.de/

-----------------------------------------------------

★ Pre-Installation Notice: Win7 Configure environment variables (MySQL for example)

(The environment variable with the corresponding command is configured without the "Go to Directory" action)

Copy the absolute path of the MySQL-installed/bin to a location such as 7 (note that each path ends with a; number), and then determine the change

--------------------------------------------------------------------

First, installation configuration Apache2.4.18 (Httpd-2.4.18-win64-vc14.zip)

1> Enter Httpd-2.4.18-win64-vc14.zip, download this package. such as

(Attached: http://www.apachelounge.com/download/)

2> unzip the downloaded httpd-2.4.7-win64-vc11.zip out of the Apache24 folder and put it in your installation directory (my directory is d:/file/phpenv)

3> then go to the Conf directory (apache24/conf/) under the Apache24 folder and find the httpd.conf file to open and modify some of the contents in Notepad

(The following path related should be based on their own decompression path to do the corresponding changes!!) )

(1) Modify the root path of the ServerRoot Apache:

<37 line >serverroot "C:/apache24"  changed to = =  ServerRoot "D:/file/phpenv/apache24"

(2) modify servername your host name:

(255 lines) ServerName www.example.com:80 removes the previous #, which is required when launching Apache from the command line.

(3) Modify DocumentRoot Apache access to the home folder directory, is the location of PHP, HTML code files. Apache default path is under Htdocs (Apache24/htdocs), there will be a simple entry file index.html. This path can be modified on its own, I am here to configure it in my own new www folder (d:/file/phpenv/www), according to their own needs to make the corresponding changes.

(249 lines) DocumentRoot "C:/apache24/htdocs"        <directory "C:/apache24/htdocs" > Changed to =        DocumentRoot "d:/ File/phpenv/www "        <directory" D:/file/phpenv/www ">

(4) Modify the Portal file configuration: DirectoryIndex generally we are index.php, index.html, index.htm as the portal for Web projects. Apache Default portal only index.html need to add the other two support, of course, the settings of this portal file can be increased or decreased according to their own needs, if the requirements are more stringent can only write a index.php, so that the entry in the project can only be index.php

(282 lines) <IfModuledir_module>        directoryindex index.html       </IfModule> changed to =       <ifmoduledir _module>        directoryindex index.php index.htm index.html        </IfModule>

(5) Set the Serverscript directory:

(366 lines) scriptalias/cgi-bin/"c:/apache24/cgi-bin/" to = = scriptalias/cgi-bin/"D:/file/phpenv/apache24/cgi-bin"

(6) Change Cgi-bin directory:

(382 lines)        <directory "C:/apache24/cgi-bin" >          allowoverride none          Options None          Require all granted        </ directory> Change to =        <directory "D:/file/phpenv/apache24/cgi-bin" >            allowoverride None            Options None            Require all granted        </Directory>

4> 's going to launch Apache next.

Mouse click (start) à (run) (or win+r), enter cmd, open command prompt.

Then enter the D:/file/phpenv/apache24/bin directory to enter httpd enter.

CMD into the specified directory command (take my path as an example):       D:    carriage return        CD d:/file/phpenv/apache24/bin   carriage return

You can test without an error (Keep the command window open for the state!!!!!! )。

(If you configure the environment variable for the httpd command, you do not have to "go to the Directory" action)

You can put the index.html in the Apache24/htdocs directory under the D:/file/phpenv/www directory and enter the address in the browser: Localhos or 127.0.0.1 access will appear "It works" This means that Apache is properly installed and started.

You can also write a simple index.html file or open it yourself.

5> add Apache to the window service startup and set it to boot

1. Turn off the httpd service first (you can close the command window)

2. Reopen a new command window into the D:/file/phpenv/apache24/bin directory:

The command to add the HTTP service is: Httpd.exe-kinstall-n "ServiceName" ServiceName is the name of the service, I added: Httpd.exe-k install-n "Apache24" After the command succeeds, you will be prompted to see the Apache24 Service in the Window service startup item.

3. Then click on to start, if you do not want to set up the boot, you can also modify the startup type to Manual.

4. If you want to uninstall this service, first stop the service, then enter Httpd.exe-k uninstall-n "Apache24" to uninstall the service.

5. Of course, you can also start Apache by d:/file/phpenv/apache24bin the following ApacheMonitor.exe

So the Apache configuration is basically done.

Note: If the service does not start, it should be listen 80 port error, change 80 to 8000 or other

--------------------------------------------------------------------------

Second, installation configuration php-5.6.16 (Php-5.6.16-win32-vc11-x64.zip)

1> Enter php-5.5.16-win32-vc11-x64.zip, download this package. (e.g.) to download the thread-safe version of PHP!!!!!!!!

(Attached: http://windows.php.net/download/)

After opening the link, select the appropriate version and go to the download page (please note that the downloaded version!!!!! )

2> will download the php-5.5.10-win32-vc11-x64.zip extracted to install to their favorite directory under my Yes (d:/file/phpenvphp)

3> Copy the Php.ini-development file under the directory and rename it to php.ini it is a php configuration file

4> adding PHP support for Apache services

Open the Apache configuration file http.conf and add the following code at the end:

Apache joins PHP note space (below is the correct wording) PS: I pretend because of this problem start Apache24 delayed for a long time "

# php5 Supportloadmodule php5_module d:/file/phpenv/php/php5apache2_4.dlladdtype application/x-httpd-php. php. html. htm# Configure Thepath to Php.iniphpinidir "d:/file/phpenv/php"

I was added underneath the LoadModule

Add the time to ensure that your Php5apache2_4.dll file does exist php5.5 earlier version of the file does not have this, but the high-point version is already available, you can open the PHP installation directory to find this file

Phpinidir "d:/file/phpenv/php" This is your PHP root directory.

5> Restart the Apache server.

6> test.

Delete other files in WWW index related files, create a new index.php, the content is <?php phpinfo ();?> save, access to the information that appears in PHP indicates that PHP has been successfully installed.

Note:

Some common configuration changes in PHP: (D:/file/phpenv/php/php.ini)

Settings for time zone: Date.timezone = Asia/shanghai

Error Reporting level: Error_reporting = E_all This can all be opened in development mode.

---------------------------------------------------------------------------

Three, installation configuration mysql-5.6.29 (Mysql-5.6.29-winx64.zip)

1> Enter Mysql-5.6.29-winx64.zip, download this package. such as

(Link: http://dev.mysql.com/downloads/mysql/)

1) After opening the link, select the appropriate version and then go to the download page (please note that the downloaded version!!!!! )

2) Select "No Thanks, just start my download." No, thanks, start my download "To download the

2> Install (Unzip): Unzip to your favorite folder

3> Configuring default Files

Under the Mysql-5.7.10-winx64 directory, create a new My.ini. Copy the following code to save it. My.ini will replace the following My-default.ini file. INI file is a configuration file inside the window. Save the various default data inside.

Replace the code in the My.ini with the following code (change the two code of the installation path to its own path!!!) ):

[mysql]# set MySQL client default character set Default-character-set=utf8 [mysqld] #skip-grant-tables# set 3306 port = 3306 # Set the MySQL installation directory basedir=d:filephpenvmysqlmysql-5.6.29-winx64# set the data storage directory for the MySQL database datadir=d: filephpenvmysqlmysql-5.6.29-winx64data# Maximum number of connections allowed max_connections=200# The character set used by the service side defaults to the 8-bit encoded latin1 character set character-set-server=utf8# the default storage engine that will be used when creating a new table Default-storage-engine=innodb

4> Installing the MySQL service as an administrator into a command-line window

(The following CMD enters the path operation, if the environment variable is configured without entering the/bin directory)

In cmd into the mysql-5.6.29-winx64.zip extracted from the/bin directory (enter the corresponding directory command: CD d:.../.../...)

Input mysqld install MySQL

(Remove the service: SC delete mysql//MySQL here is the service name you want to delete)

Then enter the net start MySQL startup service

After successful as (I have already configured the environment variable so directly enter the installation command and start command on the line):

5> setting a new password for the first time

/bin directory input mysql-uroot-p, default is no password, directly press ENTER (I have set the password)

Follow these steps to add a database password:

1. Enter MySQL database:mysql> use mysql;database changed2. Set a new password for the root user mysql> update user set Password=password ("New password") where user= "root"; Query OK, 1 rows affected (0.01 sec) rows matched:1 changed:1warnings:03. Refresh the database (always remember to refresh) Mysql>flush privileges;        Queryok, 0 rows Affected (0.00 sec) 4. Quit mysql:mysql> quit

6> adding MySQL support for PHP

1) (736 lines); extension_dir = "ext", remove the front ";" and change to Extension_dir = "D:phpenvphpext" to open PHP extension support, Ext folder has a lot of PHP extension support . dll files, interested can see.

2) then the MySQL extension that opens PHP

(890, 891 lines) remove the front ";"        Extension=php_mysql.dll        Extension=php_mysqli.dll

Of course you can also open 895 rows of Php_pdo_mysql.dll enable PHP PDO support I usually use this.

Note: There are many expansion options, what you need to use, remove the front ";" You can do it. Of course if you want to add additional extension support such as Redis support, PHP itself may not provide the corresponding DLL files, you need to find the appropriate version of the DLL to add to the Ext folder, and then add a extension= in the configuration file ...

3) After completion, restart Apache24

You can see it when you visit Phpinfo (enter the address in the browser: localhost or 127.0.0.1)

7>MySQL GUI management software installation (here is : mysql-front):

1) Enter the download link to download the latest version of Mysql-front:

(mysql-front:http://www.mysqlfront.de/)

2) Start the installation (a full picture form description):

Article turned from: http://www.thinksaas.cn/topics/0/431/431112.html

Personal changes in individual places within

php5.6 + apache2.4+mysql5.7 Configuration

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.