


php 7 has been out for a while. i was busy with work a few days ago and didn’t have time to study it. now i have some time. the production environment in the company cannot be upgraded casually. you can still install it on your own computer at home and see the effect.
the following is a brief explanation of the installation of php 7 apache 2.4.
apache 2.4 installation configuration installation
apache 2.4, there is no compiled version for windows on the official website. you need to go to http://httpd.apache.org/docs/2.4/platform/windows.html to find the mirror website that provides downloading of the windows compiled version. i use the link is: http://www.apachelounge.com/download/. download the 32- or 64-bit version as needed. after downloading, it is a zip package. after downloading, unzip the apace24 directory in the zip package to any directory.
note: some information of apache and php must match, including 32/64-bit and vc version numbers. for php 7, there is only a version compiled with vc14 on the official website, so the corresponding apache version also needs to be compiled with vc14.
configuration
single site configuration
open the %apache24%\conf\httpd.conf file:
1. find "serverroot" and specify it as the directory where %apache24% is located;
2. modify the document root directory;
documentroot "e:/wwwpages" <directory "e:/wwwpages">
3. add index.php to the index directory
directoryindex index.html index.php
4. install apache as a service:
httpd.exe -k install -n "apache24"
if the service fails to start, modify the port number.
multi-site configuration (differentiated by port number)
multiple sites can be configured on one server. this section explains how to configure different sites distinguished by port numbers.
configure httpd.conf.
first add the listening port (configure several sites, add a few ports):
listen 8081
listen 8082
after the above contents are set, you can check whether the port is open through netstat -n -a.
secondly configure the virtual site:
namevirtualhost *:8080 <virtualhost *:8080> servername www.mysite1.com #documentroot "c:/rainman/projectworkspace2.0/sourcecode/server/wanpush" documentroot "c:/rainman/projectworkspace3.0_clound/sourcecode" <directory "c:/rainman/projectworkspace3.0_clound/sourcecode"> options indexes followsymlinks allowoverride none order allow,deny allow from all </directory> errorlog "logs/mysite1.com-error.log" customlog "logs/mysite1.com-access.log" common </virtualhost> namevirtualhost *:8081 <virtualhost *:8081> servername www.mysite2.com documentroot "c:/rainman/projectworkspace3.0_clound/yiqixiu" <directory "c:/rainman/projectworkspace3.0_clound/yiqixiu"> options indexes followsymlinks allowoverride none order allow,deny allow from all </directory> errorlog "logs/mysite2.com-error.log" customlog "logs/mysite2.com-access.log" common </virtualhost>
mainly configure documentroot and directory parameters for each virtual site.
verification
after the installation is complete, write the following html page:
<html> <body> <h1 id="hello-world">hello world!</h1> </body> </html>
save it as index.html and copy the file to "e:/wwwpages".
open the url: http://localhost:8080/, and the page displays "hello world!", which means that the apache installation is started successfully.
uninstall a service
uninstall the service: httpd –k uninstall –n “apache24”
note: the name must be consistent with the name during installation.
php 7.0.6 installation configuration installation download php-7.0.6-win32-vc14-x64.zip and extract it to any directory.
configuration 1. configure apache
open the apache configuration file and add the following content:
LoadModule php7_module "D:/PHPDevEnv/PHP/php7apache2_4.dll" AddType application/x-httpd-php .php AddType application/x-httpd-php .html AddHandler application/x-httpd-php .php PHPIniDir "D:/PHPDevEnv/PHP"
note: the red part uses the actual path.
2. configure php
rename php.ini-development in the php directory to php.ini, then open the file and search for "extension_dir", remove the previous comment and change it to an absolute path, for example:
extension_dir = "d:/phpdevenv/php/ext"
note: changing the path to an absolute path is to prevent some php extensions from not finding the correct path.
verification create a phpinfo.php file in the root directory of the apache website (see section 2.1 for the specific location):
phpinfo();
?>
open http://localhost:8080/phpinfo.php.

win10中提示80070035找不到网络路径的解决办法:1、单击“网络”,“打开网络和Internet设置”,选择“网络和共享中心”后再选择“更改高级共享设置”,然后勾选“启用共享以便可以访问网络的用户读取公用文件夹中的文件”;2、返回“网络和共享中心”单击“宽带连接”并选择“属性”,点击“网络”,勾选“microsoft网络客户端”即可。

win10找不到网络适配器驱动的解决办法:1、更新驱动程序,可以使用设备管理器来更新驱动程序;2、重新安装驱动程序,先卸载设备,再重启电脑;3、从制造商网站下载驱动程序;4、检查硬件故障。

win10自带的看图软件叫“Microsoft照片”,其下载方法是:1、打开win10电脑;2、在Microsoft Store中搜索“Microsoft照片”并下载;3、将照片查看器的默认软件设置为【照片】即可。

win10任务栏经常假死的原因是win10 64位系统可靠性不佳造成的,其解决方法:1、重启“windows资源管理器”;2、卸载冲突软件;3、重新“部署操作进程”;4、修复系统服务;5、通过powershell命令尝试修复;6、cmd中执行修复命令;7、针对右击任务栏应用图标时弹出菜单缓慢的情况;8、通过新建Windows用户来重置系统设置;9、还原系统。

win10更新后无法上网解决方法:1、检查网络连接,使用其他设备连接同一网络来确认网络是否可用;2、检查网络驱动程序,找到网络适配器,并检查是否有任何驱动程序更新可用;3、重置网络设置,打开“命令”窗口,输入“netsh winsock reset”和“netsh int ip reset”,然后重启;4、更新网络驱动程序;5、检查防火墙和安全软件设置,暂时禁用重新连接即可。

win10右键没有管理员权限的解决办法:1、在电脑桌面右键点击“此电脑”;2、在弹出的列表中找到“管理”,点击打开;3、依次选取“系统工具”->“本地用户和组”->“用户”;4、在中间栏找到并点击打开“Administrator”;5、取消勾选“账户已禁用”,然后点击“应用”和“确定”即可。

win10本地组策略编辑器找不到解决步骤:1、新建文本文档;2、打开文档,输入代码“@echo off...pause”;3、输入代码后,点击“文件”,选择“另存为”选项;4、在弹窗中,将文件后缀名改成“.bat”;5、鼠标右键点击.bat文件,点击“以管理员身份运行”;6、键盘按下“Win+R”打开运行,输入“gpedit.msc”并点确认;7、成功打开本地组策略编辑器。

解决方法:1、先重启“Windows资源管理器”;然后以管理员身份运行powershell,执行命令重新部署进程;最后在“个性化”设置界面中,关闭加载最常访问列表功能。2、打开powershell窗口,利用命令检查并修复Windows文件。3、打开“本地组策略编辑器”,进入“内置管理员帐户的管理员批准模式”的属性窗口;然后在“本地安全设置”选项卡中,点击“启用”;最后重启电脑。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version
SublimeText3 Linux latest version
