Home Backend Development PHP Tutorial Win7下手动安装apache2.2、php5.4笔记_PHP

Win7下手动安装apache2.2、php5.4笔记_PHP

May 30, 2016 pm 02:59 PM
php5.4 win7 Manual installation

纯记录,流水账。

首先创建d:\www目录,我们把web环境软件都装到这个目录下。
创建d:\www\logs目录,一些日志会放在这里。

从http://mirrors.cnnic.cn/apache/httpd/binaries/win32/ (apache.org上提到的镜像站点)下载到了httpd-2.2.25-win32-x86-openssl-0.9.8y.msi

安装apache2.2.25,选了下安装路径d:\www\apache2.2,其它都是下一步完成安装。

访问localhost,显示It works!

Apache安装完成。

--------------------------------------------------------

从http://windows.php.net/download/#php-5.4下载到php5.4最新稳定版5.4.21
注意需要下载:VC9 x86 Thread Safe ,zip版的,否则nts是没有php5apache2_2.dll文件的,当时浪费了我不少时间。
http://windows.php.net/downloads/releases/php-5.4.21-Win32-VC9-x86.zip

下完解压到d:\www\php-5.4.21

打开apache2.2\conf\httpd.conf
拉到最底部:

代码如下:


LoadModule php5_module "D:/www/php5.4.21/php5apache2_2.dll"
LoadFile D:/www/php5.4.21/php5ts.dll
LoadFile D:/www/php5.4.21/ssleay32.dll
PHPIniDir "D:/www/php5.4.21"
AddType application/x-httpd-php .php


这样php的支持就配完了。

再完善下:

代码如下:


ErrorLog "d:\www\logs\apache_error.log"
LogLevel error
Include conf/extra/httpd-vhosts.conf前面的注释#去掉
编辑httpd-vhosts.conf,假设web目录在e:/www下。
#NameVirtualHost *:80
FileETag none
DirectoryIndex index.html index.php

  Options Indexes FollowSymLinks Includes
  AllowOverride All
  Order allow,deny
        Allow from all


    ServerName www.bitsCN.com
    DocumentRoot "E:\hx\www.bitsCN.com"      


打开D:\www\php5.4.21\php.ini

代码如下:


log_errors = On
error_log = D:\www\logs\php_error.log

extension_dir="D:\www\php5.4.21\ext"
extension=php_mysql.dll
extension=php_curl.dll


其它看情况配置

这样web环境就基本上配好了。

--------------------------------

附加:
下载apc,以前需要到处找,现在官方提供了!在http://pecl.php.net/package/APC下载最新版:http://windows.php.net/downloads/pecl/releases/apc/3.1.13/php_apc-3.1.13-5.4-ts-vc9-x86.zip,解压php_apc.dll到D:\www\php5.4.21\ext目录。
要下memcache.dll,也有提供了,http://pecl.php.net/package/memcache。

代码如下:


extension=php_apc.dll
extension=php_memcache.dll


不过,apc这个版本似乎有点问题。
总是出这些,只好不启用。

代码如下:


Notice: Unknown: 1. h->opened_path=[null] h->filename=[E:/hx/www.bitsCN.com/test_file.php] in Unknown on line 0

Notice: Unknown: apc_cache_find [-833243605] in Unknown on line 0

Notice: Unknown: 2. h->opened_path=[E:/hx/www.bitsCN.com\test_file.php] h->filename=[E:/hx/www.bitsCN.com/test_file.php] in Unknown on line 0

Notice: Unknown: apc_cache_make_file_entry: entry->data.file.filename is [E:/hx/www.bitsCN.com\test_file.php] in Unknown on line 0

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I do if the Win7 taskbar does not display the icon? How to solve the problem of the computer taskbar icon disappearing What should I do if the Win7 taskbar does not display the icon? How to solve the problem of the computer taskbar icon disappearing Jun 09, 2024 pm 01:49 PM

Recently, many users using Win7 system have found that the icons in the taskbar suddenly disappeared, which makes the operation very inconvenient and they do not know how to solve the problem. This article will introduce to you how to solve the problem of disappearing taskbar icons in Win7 system. Bar! Cause Analysis When encountering such a situation, there are generally two situations: one is that the taskbar on the computer does not really disappear, but is just hidden, and the other is that the taskbar does disappear. Method 1: 1. There is a situation that you need to confirm first, that is, when the mouse is placed at the bottom of the screen, the taskbar will be displayed. You can directly click the mouse on the taskbar and select "Properties". 2. In the dialog box that opens, click & on the "Hide taskbar" option.

How to clear all desktop background images in Win7? Tips for deleting personalized background images in Win7 How to clear all desktop background images in Win7? Tips for deleting personalized background images in Win7 Jun 02, 2024 am 09:01 AM

In Win7 system, many users want to delete personalized desktop background images, but do not know how to delete them. This article will show you how to delete personalized background images in Win7 system. 1. First, open the control panel interface of the Win7 system and click to enter the "Appearance and Personalization" settings; 2. Then, in the opened interface, click the "Change Desktop Background" setting; 3. Then, click below "Desktop background" option; 4. Then, select Select all, and then click Clear all. Of course, you can also use it under "Customize", right-click the theme you want to delete, and then click &q on the shortcut menu

How to add Windows credentials in Win7 How to add Windows credentials in Win7 Mar 26, 2024 pm 07:46 PM

1. First, select the Control Panel option in the Start button of the Win7 system. 2. Then in the control panel that pops up, click the [User Accounts and Family Safety] item. 3. Then click [Credential Manager] in the pop-up interface. 4. Finally, click [Add Windows Credentials] to create your credentials. The operation method of adding and managing windows credentials in win7 is shared here in detail with friends. More exciting tutorials are available on the PHP Chinese website!

Where is the network discovery in Win7? Tips for enabling the network discovery function in Win7 Where is the network discovery in Win7? Tips for enabling the network discovery function in Win7 Jun 04, 2024 am 09:02 AM

Many computer users know that network discovery is a network setting. This setting will affect whether the computer can find other computers and devices on the network and whether it can find the computer when other computers on the network are found. So how to enable network discovery in win7? The following computer System Home U Disk Installation will introduce you to the tutorial on how to enable network discovery in win7 system. 1. First, click the "Start Menu" icon on the desktop taskbar and choose to open the "Control Panel" interface. 2. Then, in the interface that opens, set "View by" to "Category", and then choose to enter "Network and Internet"

How to quickly cancel the power-on password of WIN7 How to quickly cancel the power-on password of WIN7 Mar 26, 2024 pm 06:56 PM

1. Press win+r to enter the run window, enter [controluserpasswords2] and press Enter. 2. In the user account window, uncheck [To use this machine, the user must enter a username and password (E)], and then click [Apply → OK].

How to delete vbs virus in win7 How to delete vbs virus in win7 Mar 26, 2024 pm 09:21 PM

1. Click [Start → Run] and enter gpedit.msc. On the left side of the [Group Policy] window, click the [Computer Configuration → Windows Settings → Security Settings → Software Restriction Policy] item, and then click the [Action → Create New Policy] menu item. As shown in the picture: 2. Select [Other Rules] from the left. Right-click the blank space in the right pane and select the [New Path Rule] item in the menu. In the pop-up window, click the [Browse] button after [Path], select the wscript.exe file in the C: WindowsSystem32 folder, and set the [Security Level] to [Not Allowed]. Change C: System32, Dllcache and I386 under Windows

How to modify boot animation in Windows 7 How to modify boot animation in Windows 7 Mar 26, 2024 pm 08:51 PM

1. Press and hold the [Win+R] keys to open the run dialog box, enter [regedit] in the search box, and then confirm; as shown in the figure: 2. Open HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionAuthenticationLogonUIBackgroud in the opened registry editor; as shown in the figure Display: 3. Double-click [OEMBackground] and open it, change the default value [0] to [1], and then confirm to exit; as shown in the figure: 4. Rename the image backgroundDefault.jpg, (the image size cannot exceed 256k

Introduction to how to change the startup sound of Windows 7 computer Introduction to how to change the startup sound of Windows 7 computer Mar 26, 2024 pm 09:30 PM

1. First copy the file you want to use as boot music to the corresponding directory of C: WindowsMedia. As shown in the figure: 2. Right-click the desktop on a single machine and select Personalize menu; as shown in the figure: 3. Select the sound option; as shown in the figure: 4. In the [Program Events] box in the [Sound] tab of the sound interface Select [Windows Login], then click [Browse]; as shown in the figure: 5. Select the music file that needs to be replaced, click Open, then click Apply and confirm to save the settings. as the picture shows:

See all articles