php5.4.3装配教程
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

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

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.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

Deploying Hadoop Distributed File System (HDFS) on a CentOS system requires several steps, and the following guide briefly describes the configuration process in stand-alone mode. Full cluster deployment is more complex. 1. Java environment configuration First, make sure that the system has Java installed. Install OpenJDK with the following command: yumininstall-yjava-1.8.0-openjdk-devel Configure Java environment variables: echo "exportJAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk">>/etc/profileecho"ex

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

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里边了
http://amixyue.blogbus.com/logs/107621313.html