Home Backend Development PHP Tutorial php5.4.3装配教程

php5.4.3装配教程

Jun 13, 2016 pm 01:14 PM
apache dll php windows

php5.4.3安装教程
PHP5.4.x发布已经有一段时间了,最新的版本是5.4.3。站长一直没有升级到此版本,并且站长也建议大家仍然使用5.3.x版本。原因是,php5.4刚刚发布,其修改频率肯定较大,而且php官方一直没有发布windows平台的msi安装程序,而是提供的压缩包。这也在一定程度上说明,php官方对于php5.4的发布并不完善。
但是,站长也发现网络已经有人在搜寻Php5.4.3的安装教程了,想必是压缩包需要手动配置,给大家带来了不便,这也是我建议大家使用php5.3的原因,因为在windows平台你可以下载安装程序来安装,非常方便。至于linux下,当然就无所谓了,因为反正是要编译安装的。
下面,我给出php5.4.3的安装过程:
1、到http://windows.php.net/download/下载zip压缩包,将压缩包的源码解压到一个文件夹,如:D:\php
2、打开D:\php目录,将php.ini-production重命名为php.ini,官方推荐我们使用这一版本的php.ini,因为它的设置已经被优化过了。
3、尽管已经事先优化过,你还是需要手动配置一些额外信息,打开php.ini,配置以下信息
extension_dir:即php加载扩展的目录,默认在php安装目录下的ext文件夹,因此你只要在php.ini找到这个配置项,去掉其前面的分号即可,修改之后形如:extension_dir = “ext”
extension = xxxxx.dll:开启需要加载的扩展库,在php.ini中搜索“Dynamic Extensions”,然后往下翻,你会发现很多行,这样的字符串,如:
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_fileinfo.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
……….
去掉前面的分号即可打开相应的扩展,如果你不确定应该打开哪些扩展,不要紧先把mysql相关的扩展打开,如果以后要用到某个扩展库发现不行时,再来配置也可以。
完成第三步后,php这边的配置就算完成了,记得修改完php.ini之后要保存。下面配置web服务器,以apache为例
4、打开apache的配置文件,httpd.conf,在文件的末尾添加:
#
LoadModule php5_module “D:/php/php5apache2_2.dll”
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir “D:/php”
对以上代码的说明:
LoadModule php5_module “D:/php/php5apache2_2.dll”,加载php安装目录的对应apache版本的dll文件,你应该查看你的php安装目录看以使用正确的dll,有的使用的是php5apache2.dll,不要弄错了。
AddHandler application/x-httpd-php .php,让apache解释php文件。
PHPIniDir “D:/php”,指定php.ini文件所在的目录。
记住当在 Windows 环境下的 Apache 配置文件中添加路径值时,所有的反斜线,如 c:\directory\file.ext,应转换为正斜线: c:/directory/file.ext。对目录来说,也必须由斜线结尾。
5、最后就为PHP添加系统环境变量,右键“我的电脑”-“属性”-“高级”-“环境变量”,在“系统变量”那一栏里找到“PATH”,双击打开。在“变量值”的末尾添加
;D:\php
,将你的php安装路径添加到环境变量。
至此,我们已经完成了php5.4.3的安装。如果你在安装之前曾经卸载过使用msi安装程序安装的php版本,并且还没有来得及重启电脑,那么你应该现在重新启动电脑,以完成卸载过程,以免造成意外情况。
重新启动后,在web根目录新建index.php,写入如下代码:
phpinfo();
?>
启动apache,访问:http://localhost,如果版本显示为php5.4.3,那么说明你已经安装成功了!
以上安装过程确实比较繁琐,稍不留神就会因为不经意的错误造成apache无法启动或者php无法加载扩展库之类的情况,这也是站长建议大家在windows平台安装php5.3的原因之一。
php5.4.3的安装就介绍到这里,希望对大家有帮助,有问题可以跟帖哦~

http://www.phptogether.com/archives/12390

1 楼 pengzhaocheng16 2012-06-14  
php5ts.dll
php5ts.dll文件是php的内核动态链接库文件,没有此文件则php解析器无法使用。
因此在windows里Apache加载PHP时,Apache不止要加载PHP的Apache模块
LoadModule php5_module modules/php5apache2_2.dll
指定什么类型文件用php解析器解析
AddType application/x-httpd-php .php
很重要的一点是将php5ts.dll文件拷到可搜索的系统目录中,即windows的环境变量如c;\windows\system32。我的是放在了apache2/bin里边了
另外PHP支持mysql时php5ts.dll文件还需要libmysql.dll的支持,因此libmysql.dll文件也要copy到到可搜索路径中。我的把libeay32.dll,ssleay32.dll,php_curl.dll,php5ts.dll  libmysql.dll都放在apache2/bin里边了

2 楼 pengzhaocheng16 2012-06-14  
tomcat提供php服务配置:
http://amixyue.blogbus.com/logs/107621313.html
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)

How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? Feb 21, 2025 pm 10:54 PM

The way to update ByBit exchanges varies by platform and device: Mobile: Check for updates and install in the app store. Desktop Client: Check for updates in the Help menu and install automatically. Web page: You need to manually access the official website for updates. Failure to update the exchange can lead to security vulnerabilities, functional limitations, compatibility issues and reduced transaction execution efficiency.

deepseek web version entrance deepseek official website entrance deepseek web version entrance deepseek official website entrance Feb 19, 2025 pm 04:54 PM

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Detailed explanation and installation guide for PiNetwork nodes This article will introduce the PiNetwork ecosystem in detail - Pi nodes, a key role in the PiNetwork ecosystem, and provide complete steps for installation and configuration. After the launch of the PiNetwork blockchain test network, Pi nodes have become an important part of many pioneers actively participating in the testing, preparing for the upcoming main network release. If you don’t know PiNetwork yet, please refer to what is Picoin? What is the price for listing? Pi usage, mining and security analysis. What is PiNetwork? The PiNetwork project started in 2019 and owns its exclusive cryptocurrency Pi Coin. The project aims to create a one that everyone can participate

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Coinsuper exchange software channel official website entrance Coinsuper exchange software channel official website entrance Feb 21, 2025 pm 10:39 PM

The official website entrance of the Coinsuper Exchange: https://www.coinsuper.com. The client download channels are: Windows client, macOS client, and mobile (iOS/Android). Registration requires an email, mobile phone number and password, and you need to complete real-name authentication before you can trade. The platform provides a variety of digital asset transactions, including Bitcoin, Ethereum, etc., with the transaction fee rate of 0.1% for both orders and acceptors. Security safeguards include cold wallet storage, dual-factor verification, anti-money laundering and anti-terrorism financing measures, and with security public

BITGet official website installation (2025 beginner's guide) BITGet official website installation (2025 beginner's guide) Feb 21, 2025 pm 08:42 PM

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

See all articles