Apache2.4/24+php5+mysql Configuration

Source: Internet
Author: User
Tags php language
software Download

Currently, neither Apache nor PHP has the official 64-bit version.

Apache 64-bit:

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

This installation file I have uploaded to the CSDN resource space, you can search for download!

PHP 64-bit:

This installation file I have uploaded to the CSDN resource space, you can search for download!

MySQL 64-bit:

http://dev.mysql.com/downloads/mysql/

Install Apache

1. Unzip

Unzip the downloaded httpd-2.2.17-win64.rar compressed package into a directory, such as D:\Apache2.2

2. Edit the configuration file D:\Apache2.2\conf\httpd.conf make the following changes "Note that you must use the left slash in the path":

ServerRoot "/httpd-2.2-x64" instead

ServerRoot "d:/apache2.2"

Listen 80 instead

Listen 8080 #端口, if IIS is turned on, port 80 cannot be used

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

DocumentRoot "D:/apache2.2/htdocs" #放置网站文件的路径

DirectoryIndex index.html instead

directoryindex index.html index.htm index.php #加入 index.php , default page for PHP

scriptalias/cgi-bin/"/httpd-2.2-x64/cgi-bin/" instead

scriptalias/cgi-bin/"d:/apache2.2/cgi-bin/"

Switch

Switch

will be LoadModule rewrite_module modules/mod_rewrite.so before the #去掉

3. Execute the installation command:

Enter D:\Apache2.2\bin

Execute command: httpd.exe-k Install ( add Apache to system service, default service name is Apache2.2)

Execute command: httpd.exe-k start ( Run service )

You can use D:\Apache2.2\bin\ApacheMonitor.exe to open, close, restart and monitor services later.

4. test whether the installation was successful

Open the browser and enter: http://localhost:8080, show It works! Description Success!

Install PHP in the first place

1. Copy the php-5.2.5 (x64) folder from 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

under #LoadModule vhost_alias_module modules/mod_vhost_alias.so line, add:

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

Phpinidir "d:/php"

under addtype application/x-gzip. GZ tgz , add:

AddType application/x-httpd-php. php

AddType application/x-httpd-php. HTML # . htm l ,. php Extensions for the executable PHP language

3. Copy the following files 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.D ll

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

Modify Extension_dir = "./" for

Extension_dir = "ext" # Specify the directory for the Dynamic connection library

Remove the semicolon (note) before Extension=php_mysql.dll

5. test whether the installation is successful

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

Restart httpd service input URL: http://loalhost:8080 , see the php Information, description of Success!

Installing the MySQL64 bit

Don't repeat it.

Install Php My Admin

1, Apache.

Apache requires a 64-bit version. http://www.blackdot.be/?inc=apache/binaries, download that httpd-2.2.15-win64.rar on the go. Note that this is the blackdot of the 64, in praise of their obscurity of dedication, but also to note that it is not an official binaries, the consequences should be self-inflicted (in other words, if there is any obvious consequences ihenry will not write in this article).

There is no installation program in the inside. Unzip it to a suitable place, here is C:\server\httpd-2.2-x64. Make sure you have the appropriate permissions.

The following changes are httpd.conf. This configuration file, easy to understand is a name. Even if there is no operating instructions, according to the English comment line can also be understood. But for the sake of convenience, it is necessary to change the explanation:

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/"

In my experience, the bold is to be changed. The data here is based on the previous determination of the directory, if you use your own path, do not forget to write the absolute path, the backslash (\) is also changed to a forward slash (/). Also, open the mod_rewrite limit: Remove the # number in front of "LoadModule rewrite_module modules/mod_rewrite.so".

It's time to install! Enter the command prompt with administrator privileges to execute

Bin\httpd.exe-k Install

Bin\httpd.exe-k start

can be. Double-click the Bin\apachemoNITor.exe to control the Apache service switch via the tray icon. Open the browser, enter localhost, witness the miracle of the time to ...

2, PHP.

This is the hardest part. First, resources are difficult to obtain. The reference document I found was 5.2.5, indeed 5.3.0RC4 x64, but not applicable. The entire network may be Fusionxlan (http://www.fusionxlan.com/PHPx64.php) has x64 version of 5.2.5, but Fusionxlan.com was dropped by the wall ... Unwilling to mind Ah, Google filename, the results found in the CSDN resources. The guy who uploaded the resources claims to be using a VPN to get the download ... CSDN is strongly despised here. The name of the MSDN, but no MSDN style, the entire entertainment station, the next broken file also want me to register to buckle my point. No way, just go over the wall. Thank air-proxy, although the download speed is limited to 40kb/s, but for a 13M file is basically enough. Download unzip, set the path to C:\server\php.

Here is the Apache module to load. In the LoadModule directives inside, the end adds such a few lines.

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 (no regsvr32 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 (the original one less this, the harm of WP always error "PHP does not appear to install MySQL extension")

A copy of the php.ini-dist is called php.ini. Open this file, modify

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

Allow_url_fopen = Off

These DLLs are loaded by means of removing semicolons.

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

And then some configuration of MySQL

Mysql.default_port = 3306
Mysql.default_host = localhost

Change 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.

The PMA has not been tested, but in fact, to its own use, phpmyadmin purely nothing. Download the official GUI Tools yourself and use x86.

Copy your app to C:\server\httpd-2.2-x64\htdocs and you're ready to run.

The above describes the Apache2.4/24+php5+mysql configuration, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.