Win764-bit php

Source: Internet
Author: User
Tags vc9
A: Preparation Phase 1: phpphp-5.5.13 download link: windows.php.netdownloadsreleasesphp-5.5.13-Win32-VC11-x64.zip recommended ThreadSafe (thread safety) V11x64, That Is 64bit. Now the PHP installation package downloaded on the official PHP website contains the words VC11 or VC9. What is the meaning of this? Which one should we download?

A: Preparation Phase 1: php php-5.5.13 download link: http://windows.php.net/downloads/releases/php-5.5.13-Win32-VC11-x64.zip recommended Thread Safe (Thread security) V11 x64, That Is 64bit. Now the PHP installation package downloaded on the official PHP website contains the words VC11 or VC9. What is the meaning of this? Which one should we download?

I. preparation phase

1: php

Php-5.5.13 download link: http://windows.php.net/downloads/releases/php-5.5.13-Win32-VC11-x64.zip

We recommend Thread Safe (Thread security) V11 x64, that is, 64bit.

Now, the PHP installation package downloaded on the PHP official website contains the words VC11 or VC9. What is the meaning of this? What kind of installation package should we download?

In fact, the PHP official website provides the answer:

VC9 and VC11

More recent versions of PHP are built with VC9 or VC11 (Visual Studio 2008 and 2012 compiler respectively) and include improvements in performance and stability.

The VC9 builds require you to haveVisual C ++ Redistributable for Visual Studio 2008 SP1X86 or x64 installed.

The VC11 builds require to haveVisual C ++ Redistributable for Visual Studio 2012X86 or x64 installed.

VC9 indicates that PHP of this version is compiled with VisualStudio2008, while VC11 is compiled with VisualStudio2012. This means

If you download the version of VC9, You need to first install VisualC ++ RedistributableforVisualStudio2008SP1,

If you download the version of VC11, you must first install VisualC ++ RedistributableforVisualStudio2012.

V11 is a component of Microsoft. If it is not installed, msvcr110.dll is lost.

Download link: http://www.microsoft.com/zh-CN/download/details.aspx? Id = 30679

Download 64bit. After installation, restart your computer.

2: apache2.4.9, download link: http://www.apachelounge.com/download/

V11 and 64-bit are also recommended.

3: mysql 5.6.19, download link: http://dev.mysql.com/downloads/mysql/

Also recommended mysql-5.6.19-winx64.zip

Ii. method/step

1: Install and install apache2.4.9(httpd-2.4.9-win64-vc11.zip)

Unzip the downloaded installation package: the httpd-2.4.9-win64-VC11.zip put it in its own installation directory (my directory E: \ Apache24)

Then modify the configuration file http. conf (E: \ Apache24 \ conf \ http. conf)-open it with notepad.

    (1)Modify the root path of ServerRoot Apache:

(37 rows) ServerRoot "c:/Apache24" changed to => ServerRoot "E:/Apache24"

  (2)Modify ServerName your host name:

(Row 217) ServerNamewww.example.com: 80 remove the previous #. This attribute is required when Apache is started from the command line.

  (3)Modify the directory of the main folder accessed by DocumentRoot Apache, that is, the location of php and html code files. The default path of Apache is under htdocs (E: \ Apache24 \ htdocs.pdf, which contains a simple access file index.html. You can modify the path by yourself. Here, I will configure it in my new folder www (E: \ php \ www.

(Row 3) DocumentRoot "c:/Apache24/htdocs"

 

Change to =>

DocumentRoot "E: \ php \ www"

  (4)Modify the configuration of the portal file: in general, we use index.php?index.html=index.htm as the portal for web projects. Only index.html needs to be added to the access port of apachetings. Of course, the settings of this entry file can be increased or decreased according to your own needs. If the requirements are strict, you can write only one index. php, so the entry in the project can only be index. php

(274 rows)

DirectoryIndexindex.html

Change to =>

DirectoryIndex index. php index.htm index.html

  (5)Set the serverscript directory:

(Row 3) ScriptAlias/cgi-bin/"c:/Apache24/cgi-bin/" changed to => ScriptAlias/cgi-bin/"e:/Apache24/cgi-bin"

(6)(374 rows)

AllowOverride None

Options None

Require all granted

Change to =>

AllowOverride None

Options None

Require all granted

Then you can start Apache.

Start --- run, Enter cmd, and open the command prompt. Go to the e: \ Apache24 \ bin directory and press ENTER httpd,

If no error is reported, you can test it (keep the command window open ).

Put index.html under the Apache24 \ htdocsdirectory in the e: \ php \ www directory. "It works" appears when accessed by a browser. This means that apache has been correctly installed and started. You can also open a simple index.html file.

Note: Apache uses port 80 by default. If port 80 is occupied, Apache cannot be started. You can change the Apache port to solve this problem.

Change the port: Find the httpd. conf file (e: \ Apache24 \ conf \ httpd. conf) in the conf directory under the Apache installation directory ). Open it. Find "Listen80", and the number of Listen is the port number. We will change it to "Listen 8080 ". You can also change it to another unused port number .. Restart Apache to make the new configuration take effect. You can use "Apache Serive Monitor" in the lower-right status bar to start apache. You can also click start> RUN> Enter cmd> press enter> go to the apache installation directory to go to the bin directory, and then enter httpd-k start ".

  

Add Apache to the window Service Startup item and set it to boot

Close the httpd service first (close the command window)

Open a new command window and go to the E: \ Apache24 \ bin directory:

The command to add the HTTP service is: httpd.exe-kinstall-n "servicename" servicename is the service name. What I add is: when the httpd.exe-k install-n "Apache24" command is successful, a prompt is displayed. You can view the Apache24 service in the window Service Startup item.

Or (e: \ apache24 \ bin \ httpd.exe-k install)

In this case, if you see: Installing the Apache2.4 service (OS 5), access is denied. : AH00369: Failed to open the WinNT service manager, perhaps you forgot to log in as Adminstrator? This error occurs because the downloaded file is in zip format when Apache is installed. If it is not an msi installation version, you must register your own service to have the httpd icon in the desktop taskbar. As a result, an error occurred while entering the installation command in the cmd command line. The error message shows that I did not log on as an administrator!

Solution: Run cmd as an administrator and then enter the command again. After successful execution, you can find the Apache24 service in the system service.

Click Start. If you do not want to set it to boot, you can change the start type to manual.

If you want to uninstall the service, stop the service first. Then, enter httpd.exe-k uninstall-n "Apache24" to uninstall the service.

Of course, you can also start Apache using apachemonitor.exe under E: \ Apache24 \ bin.

The Apache configuration is complete.

2: Install php5.5.13(php-5.5.13-win32-vc11-x64.zip)

  

   (1)Unzip the downloaded php-5.5.10-win32-vc11-x64.zip file to the installation directory (D: \ phpEnv \ php)

   (2)Copy the php. ini-development file in the directory and change it to php. ini. It is the configuration file of php.

   (3)Add php support for Apache service

Open the Apache configuration file http. conf and add

# Php5 support

LoadModule php5_module e:/php/php5apache2_4.dll

AddType application/x-httpd-php. php. html. htm

# Configure thepath to php. ini

PHPIniDir "e:/php"

Here I add it under LoadModule

Make sure that the php5apache2_4.dll file exists in the php5.5 earlier version, but the file is already available in the later version. You can open the php installation directory to find the file.

PHPIniDir "e:/php". This is your php root directory.

   (4). Restart the Apache server.

   (5). Test. Delete other files in www and create an index. php file. The content is Save. Accessing the php information indicates that php has been successfully installed.

Note:

Some common Php configuration changes: (e: \ php. ini)

Time zone settings: date. timezone = Asia/Shanghai

Error Report Level: error_reporting = E_ALL, which can be enabled in development mode.

Win7 64-bit php-5.5.13 + Apache 2.4.9 + mysql-5.6.19 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.