search

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
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
PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

How does PHP handle object cloning (clone keyword) and the __clone magic method?How does PHP handle object cloning (clone keyword) and the __clone magic method?Apr 17, 2025 am 12:24 AM

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP vs. Python: Use Cases and ApplicationsPHP vs. Python: Use Cases and ApplicationsApr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

See all articles

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)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

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.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor