Home > Backend Development > PHP Tutorial > Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

WBOY
Release: 2016-07-21 15:58:17
Original
821 people have browsed it

目的:配置运行PHP的环境(IIS+PHP+MYSQL+CF+Perl)支持php+cgi+asp+jsp等

操作系统:windows2000 advance server(sp3)简体中文版

需要相关软件:

一:php-4.3.0-Win32.zip ,到相应站点下载,我上传文件不方便,以下同。

二:ActivePerl-5.6.1.635-MSWin32-x86.msi ,注意,必须下载安装文件,就是说.msi的,不要下原代码了,我也不会弄原代码,加装这个支持cgi,如果你不想支持cgi也可以不下载这个安装

三:mysql-4.0.7-gamma-win.zip

四:MM ColdFusion MX(有没有这个无所谓拉,我也是装着玩的,主要是支持PHP+MYSQL)

一切都以我机子上目录为标准,假定你机子上L:\WEB为你的站点根目录

将php-4.3.0-Win32.zip解压缩到L:\php目录下

复制php目录下php4ts.dll到winnt\system32目录下

复制php.ini.dist到winnt目录下,并将扩展名.dist去掉,得到php.ini文件,用记事本打开修改两个参数:

1.搜索extension_dir ,将其指向你的PHP的extensions目录,比如我是L:\PHP\extensions,我这样修改:

extension_dir = L:\PHP\extensions 这些等你想支持一些扩展库的时候可以修改extension

保存php.ini

安装mysql:

打开mysql-4.0.7-gamma-win.zip压缩包

双击setup.exe运行程序,在安装过程中注意选择mysql的安装目录(当然,你要默认目录也可以),比如我安装在L:\mysql目录下运行L:\mysql\bin\mysqld-nt.exe ,其实一般安装完成后系统都自动启动服务了,如果不放心到“服务”看一下mysql是否启动

安装M$ Office ,不知道要不要安装这东西才支持asp我就不知道了,反正我装完系统后就全部安装office了,呵呵,估计没装也支持asp,(如果你不想它支持asp可以不去管它)

安装perl解释器:

运行ActivePerl-5.6.1.635-MSWin32-x86.msi,安装过程中选择L:\perl目录,当然你要默认也行。

装MM的ColdFusion MX,我是装到L:\ColdFusionMX目录下了

配置服务器,嘿嘿,写到这边不得不开photoshop弄图了,说不好说

点击 开始-》程序-》管理工具-》Internet 服务管理器

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

单击“默认 web 站点”,然后右键单击它,选择“属性”,打开对话框

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial



Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

单击“主目录”,做如下设置:在“本地路径”中选择你的机子上要作为站点根目录的文件夹,比如我的是L:\WEB,如下图:然后点击右下方的“配置”,弹出新的对话框

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

在新的对话框中选择“添加”

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

在可执行文件中浏览选择L:\php\sapi\php4isapi.dll,注意在浏览对话框中文件类型要选择*.dll,不然看不到L:\php\sapi\目录下的.dll文件哦,选定后在扩展名中输入.php ,如下图:

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

单击确定

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

如上方法在添加L:\perl\bin\perlis.dll,设置扩展名为.cgi (这是我自己研究的,装支持cgi的时候我没看任何资料,如php一样依样画葫芦,呵呵),如下图设置,单击确定就OK了

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

最后一步设置默认文件,就是index.php拉什么的,如下图,设置好后一路确定后关闭“Internet 服务管理器”

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

好象这样就可以了哦,测试一下php拉,其他各位自己写程序测试咯,建个info.php的文件,保存在你的web根目录下,用记事本打开,复制下列内容保存:


phpinfo();
?>

如果一切顺利的话会见到如下页面:

Newbies configure PHP debugging environment (IIS+PHP+MYSQL)_PHP tutorial

最后祝大家PHP玩得愉快,嘿嘿

另外,在装完MM CFMX后,站点会自动停止,请启动它,还有一个要修改的是:

Find setcp.bat in the L:CFusionMXdbslserver52admin directory, create its shortcut in the current directory, remember that the file name is also setcp.bat, then right-click the shortcut, select Properties, add a space and after the target Capitalize OS, then click OK,

For example: L:CFusionMXdbslserver52adminsetcp.bat OS

This is to solve the problem of garbled characters. My friend told me that after modifying it, restarting the computer will be OK.

Postscript: Many people say that debugging was unsuccessful and messages similar to these are displayed:

Warning: Unknown(D:wwwphpinfo.php): failed to create stream: No such file or directory in Unknown on line 0

Warning: Unknown(): Failed opening 'D:wwwphpinfo.php' for inclusion (include_path='.;c:php4pear') in Unknown on line 0

That’s because your info.php file is wrong. The extension is not a real .php, but a .txt file. Only by displaying the extension can you remove the .txt

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317612.htmlTechArticlePurpose: Configure the environment for running PHP (IIS+PHP+MYSQL+CF+Perl) to support php+cgi+asp +jsp and other operating systems: windows2000 advance server (sp3) Simplified Chinese version requires related software: 1: p...
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template