Apache2.4 + php5 + mysql Configuration

Source: Internet
Author: User
Tags php software
Currently, no official 64-bit version is available for Apache and PHP software downloads. Apache64-bit: www. blackdot. be? The incapachebinaries installation file has been uploaded to the csdn resource space. You can search and download it! PHP64-bit: This installation file has been uploaded to the csdn resource space, large

Currently, no official 64-bit version is available for Apache and PHP software downloads. Apache 64-bit: http://www.blackdot.be /? Inc = apache/binaries: the installation file has been uploaded to the csdn resource space. You can search and download it! PHP 64-bit: This installation file has been uploaded to the csdn resource space, large

Software Download

Currently, no official 64-bit version is available for Apache and PHP.

Apache 64-bit:

Http://www.blackdot.be /? Inc = apache/binaries

I have uploaded this installation file to the csdn resource space. You can search and download it!

PHP 64-bit:

I have uploaded this installation file to the csdn resource space. You can search and download it!

MySQL 64-bit:

Http://dev.mysql.com/downloads/mysql/

Install Apache 64-bit

1. Extract

Decompress the downloaded httpd-2.2.17-win64.rar package to a directory, such as D: \ Apache2.2.

2. Edit the configuration file D: \ Apache2.2 \ conf \ httpd. conf to make the following changes. [Note that the Left slash must be used in the path ]:

ServerRoot "/httpd-2.2-x64" changed

ServerRoot "D:/Apache2.2"

Change Listen 80

Listen 8080 # port. If IIS is enabled, port 80 cannot be used.

DocumentRoot "/httpd-2.2-x64/htdocs" changed

DocumentRoot "D:/Apache2.2/htdocs" # path for storing website files

Change DirectoryIndex index.html

DirectoryIndex index.html index.htm index. php # Add the index. php and PHP development pages.

ScriptAlias/cgi-bin/"/httpd-2.2-x64/cgi-bin/" changed

ScriptAlias/cgi-bin/"D:/Apache2.2/cgi-bin /"

Change

Change

Remove the # Before LoadModule rewrite_module modules/mod_rewrite.so

3. Execute the installation command:

Enter D: \ Apache2.2 \ bin

Run the following command: httpd.exe-k install (add apache to the System Service. The default service name is Apache2.2)

Run the command: httpd.exe-k start (run the Service)

You can use D: \ Apache2.2 \ bin \ ApacheMonitor.exe to enable, disable, restart, and monitor the service.

4. test whether the installation is successful.

Open your browser and enter http: // localhost: 8080 to display It Works! Description successful!

Install PHP 64-bit

1. Copy the php-5.2.5 (x64) folder in the downloaded PHP installation package php-5.2.5-x64-2007-11-12.zip to a path, such as D: \ PHP

2. modify the configuration file D: \ Apache2.2 \ conf \ httpd. conf.

Add the following to the line # LoadModule vhost_alias_module modules/mod_vhost_alias.so:

LoadModule php5_module "D:/PHP/php5apache2_2.dll"

PHPIniDir "D:/PHP"

Add the following content to AddType application/x-gzip. gz. tgz:

AddType application/x-httpd-php. php

AddType application/x-httpd-php. html extension .html,. php is an extension for the executable php language

3. Copy the following file to C: \ Windows \ System32

D: \ PHP \ php5ts. dll
D: \ PHP \ php5isapi. dll
D: \ PHP \ php5apache2_2.dll
D: \ PHP \ ext \ php_mysql.dll
D: \ PHP \ ext \ php_mysqli.dll
D: \ PHP \ libmysql. dll

4. Copy D: \ PHP \ php. ini-recommended to D: \ PHP \ php. ini and make the following changes:

Modify extension_dir = "./"

Extension_dir = "ext" # specify the directory of the dynamic Connection Library

Remove the semicolon (comment) before extension = php_mysql.dll

5. test whether the installation is successful.

Modify the D: \ Apache2.2 \ htdocs \ index.html file and add:

Restart the httpd service and enter the URL: http: // loalhost: 8080. The php information is displayed, indicating that the request is successful!

Install MySQL 64-bit

No more details

Install PhpMyAdmin

1. Apache.

Apache requires a 64-bit version. Http://www.blackdot.be /? Inc = apache/binaries, download the httpd-2.2.15-win64.rar. It should be noted that this is the 64-bit version of blackdot. While praising their dedication to obscurity, it should also be noted that it is not the official binaries, the resulting consequences should be borne by yourself (that is to say, if there is any obvious consequence, iHenry will not write an article here ).

There is no installation program in it. Decompress it to a proper place, where C: \ server \ httpd-2.2-x64. Make sure you have the required permissions.

Next, modify httpd. conf. This configuration file is easy to understand. Even if there are no operation instructions, you can understand the English comments. For the sake of convenience, I 'd like to explain the changes:

ServerRoot "C:/server/httpd-2.2-x64 ″

ServerName localhost: 80

DocumentRoot "C:/server/httpd-2.2-x64/htdocs"

DirectoryIndex index.html index.htm index. php

ScriptAlias/cgi-bin/"C:/server/httpd-2.2-x64/cgi-bin /"

According to my experience, it is necessary to make a bold change. The data here is based on the directories identified above. If you use your own path, do not forget to write the absolute path. The backslash (\) should also be changed to a forward slash (/). In addition, enable MOD_REWRITE: remove the # sign before "LoadModule rewrite_module modules/mod_rewrite.so.

This is installed! Enter the command prompt with the administrator privilege and execute

Bin \ httpd.exe-k install

Bin \ httpd.exe-k start

You can. Double-click bin \ ApacheMoNITor.exe and use the tray icon to control the apache service switch. Open your browser and enter localhost to witness the miracle ......

2. php.

This is the most difficult part. First, it is difficult to obtain resources. The reference document I found uses 5.2.5, which does not apply to 5.3.0RC4 x64. The entire network may be fusionxlan (http://www.fusionxlan.com/PHPx64.php) has x64 version 5.2.5, but fusionxlan.com is down by the wall ...... The Google file name found the resource in csdn. The guy who uploads resources claims to use vpn to get the download ...... Csdn is highly despised here. The name is copied from msdn, but there is no msdn style. The whole site is an entertainment site. The next broken file also wants me to register and deduct my point. No way. You just have to dig your head over the wall. Thanks to air-proxy, although the download speed is limited to 40 kb/s, it is basically enough for a 13 m file. Download and decompress the package. The path is C: \ server \ php.

Next we will load the apache module. In LoadModule directives, add these lines at the end.

LoadModule php5_module "C:/server/php/php5apache2_2.dll"

AddType application/x-httpd-php. php

PHPIniDir "C:/server/php"

Copy these files to the system32 directory (regsvr32 is not required)

C:/server/php/php5ts. dll

C:/server/php/php5isapi. dll

C:/server/php/php5apache2_2.dll

C:/server/php/ext/php_mysql.dll

C:/server/php/libmysql. dll ")

Copy a copy of php. ini-dist, which is called php. ini. Open this file and modify

Extension_dir = "C:/server/php/ext /"

Allow_url_fopen = Off

Load the dll by removing the semicolon.

Extension = php_gd2.dll
Extension = php_mysql.dll
Extension = php_oci8.dll (Oracle database)
Extension = php_pgsql.dll (postgre database)
Extension = php_zip.dll

Configure mysql

Mysql. default_port = 3306
Mysql. default_host = localhost

Modify session. save_path = "C:/tmp"

3. mysql

This is really the simplest. Mysql has a 64-bit official installation version, which is not explained below.

4. phpmyadmin and others.

PMA has not been tested, but in fact, it is useless to find something for you to use phpmyadmin. Download the official GUI Tools by yourself and use x86.

Copy your application to C: \ server \ httpd-2.2-x64 \ htdocs and you can run it.

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.