有时候,我们需要在WINDOWS服务器中安装多个不同版本的PHP环境,或采用不同的php.ini配置,例如在使用中国E商务网的IONCUBE系统对PHP程序进行加密后,要在php.ini中设置加载选项目,但这个选项和zend加密程序解释器不能同时存在,如果在服务器中有另外程序采用ZEND加密的话,就非常可惜。
如果能在WINDOWS服务器中装多套PHP,使用不同的PHP.INI就可以解决这样的问题。但是如果采用正规的方法要重新编译PHP,比较麻烦。我们最近已经研究成功,采用另一种方式来安装多个PHP:
首先安装一套PHP,采用默认方式,装在c:php ,安装后,php.ini一般自动复制到c:winnt下。
将winnt下的php.ini用Ctrl+c和 Ctrl+V方式复制到c:php下,这时候你可以用PHPINFO()查看php.ini的路径,已经自动变成c:/php/php.ini 了。
接着,就可以安装第二套PHP,最好换个磁盘,安装在d:php,安装时,PHP又会把php.ini拷贝在c:winnt下,只要如法炮制将其拷贝到d:php下就可以了。
然后,在IIS -> 主目录->配置中,可以为不同站点指定不同的PHP运行文件就可以了。
采用此方法安装两套PHP后,对系统资源并没有特别的影响,经测试,系统运行正常。

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

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

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

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.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools