Installation configuration Apache2.4 and php7.0

Source: Internet
Author: User

The next step is to go to PHP learning, so to install Apache server and PHP, from yesterday onwards until just before the configuration is complete, the middle also encountered some problems, so tidy up and write down. Next is the Win64 bit system configuration Apache2.4 and PHP7.0 steps (there is already MySQL on the computer, so there is no way to write MySQL installation steps):

First, download the Apache2.4 steps:

A) Open: http://httpd.apache.org/download.cgi After clicking files for Microsoft Windows

    • Then click Apachehaus

Open and click the Black icon under Apache 2.4.23 x64 under Apache 2.4.x VC14 ,

  

Second, php7.0 the download Steps

Some articles recommend this site http://windows.php.net/download#php-7.0, originally I also go to this site download, PHP7.0.10 under the VC14 x86 Thread Safe (2016-aug-18 20:13:38), note that thread safe (thread safe) is not non thread safe (non-thread safe), but this error occurs when you start Apache after following the steps on the Web: The requested operation has failed! (The requested operation failed!) )

Configured a lot of times, and finally with the command to see the error (command at the bottom) found to be a PHP configuration error, so I changed a PHP version, I use php7.0.6, the configuration once again succeeded.E:/Apache24/bin/httpd.exe-w-n "apache24″-k start check Apache configuration The first few lines of error. The blue part is the path where you unzip the Apache Tarball, and it remains unchanged.

This is APACH2.4.23 's compressed package: HTTP://PAN.BAIDU.COM/S/1KVHI8ZD

This is php7.0.6 's compressed package: Http://pan.baidu.com/s/1dF5bxKl

Note: These two compressed packages should be unpacked in the same directory under the E-drive or in the same folder. My Apache24 and php7.0.6 are all in the E-packing directory III, Apache2.4 configuration and installation A, open apache24/conf/httpd.conf file for editing. 1), 38 lines to define Srvroot "E:/Apache24 "2), 39 lines ServerRoot" ${srvroot} "to ServerRoot"e:/Apache24″ Note: Is the English state of the quotation marks, the blue part is your own path, the same as 3), 246 lines DocumentRoot "${srvroot}/htdocs" changed to DocumentRoot "e:/Apache24 "(You will write the site in this directory) 4), 247 lines <directory" ${srvroot}/htdocs "> Changed to <directory"e:/Apache24 "> (IBID.) 5), 280 lines DirectoryIndex index.html to DirectoryIndex index.html index.php index.htm (newly added index.php i ndex.htm) 6), 363 lines scriptalias/cgi-bin/"e:/apache24/cgi-bin/"7), 379 lines <directory" ${srvroot}/cgi-bin "> Changed to <directory"e:/Apache24/cgi-bin "> 8), add the following three lines at the end to let Apache support Php7loadmodule PHP 7_module "e:/Php7.0.6/php7apache2_4.dll (Note that the PHP version corresponds to the modification if it is 5.) X is changed to 5)
AddType application/x-httpd-php. php. html. htm
Phpinidir "e:/php7.0.6 The configuration section here is complete. B, Apache install to system service and uninstall Apache service 1),E:/Apache24/bin/httpd-k install-n "Apache24" 2), if you want to uninstall this service, first stop the service in Task Manager, then execute the command httpd.exe-k uninstall-n "Apache24″, uninstall Complete. Iv. PHP7 Configuration Step A),e:/Php7.0.6/php.ini-production Copy and rename it to php.ini;e:/php7.0.6 and E:/php7.0.6/ext are added to the system environment variable path. (Right-click this computer = Properties = + Advanced system settings = environment variable = = System variable find path, tap edit then New,)

Then click OK ok ok, B, open a few common PHP extensions with Notepad or Sublim or Notepad (preferably Notepad or Sublim, this two software shows the number of lines) opened just renamed the php.ini file for editing 1, 724 lines; extens Ion_dir = "ext" Removes the preceding semicolon and changes to Extension_dir = "e:/apache2.4&php7.0.6/php7.0.6 "2, 867 lines; extension=php_curl.dll Remove the preceding semicolon 3, 869 lines; extension=php_gd2.dl            L REMOVE the preceding semicolon 4, 876 lines, extension=php_mbstring.dll remove the preceding semicolon 5, 878 lines; extension=php_mysqli.dll Remove the preceding semicolon 6, 882 lines; Extension=php_pdo_mysql.dll Remove the preceding semicolon if you have; Extension=php_mysql.dll so also take the semicolon out here PHP7 configuration completes the final launch of Apache, there are two ways: 1, Open apache24/bin/apachemonitor.exe,2, start cmd in Windows service: Httpd.exe-k start all the best with an administrator-mode command prompt, If Apache does not start or has other problems, you can view the error log apache/logs/error (error log only after successful operation). andE:/Apache24/bin/httpd.exe-w-N "apache24″-k start this command to see which line of the configuration file is wrong.

Install configuration Apache2.4 and php7.0

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.