首页 >后端开发 >php教程 >高手指南PHP安装配置_PHP教程

高手指南PHP安装配置_PHP教程

WBOY
WBOY原创
2016-07-15 13:27:44878浏览

PHP的快速发展,它的功能越来越强大,运用它也变得很方便,下面我们就PHP5安装配置详细的介绍一下。PHP的执行效率是有目共睹的,这也是我喜欢它的原因之一,和它称为绝妙搭档的Mysql以及Apache想融合,不能不惊叹其效率了。

PHP更新也很快,这里列举了目前最新版本PHP4.3.2RC4(几乎没有BUG了,估计写完这篇不久后正式版就出了),和最新版本的Mysql4.0.13的安装过程。PHP5安装配置文件可以直接到 http://www.php.net/ 下载,获得for win32的.zip包(5.8M)Mysql的安装文件可以直接到 http://www.mysql.com 下载,获得for win32的.zip包另外如果想体验Apache和PHP的配合效果而要放弃IIS的话,请到 http://www.apache.org 下载最新的for win31的.MSI安装包,目前最新版本是2.0.45。

PHP安装配置

1.解压缩PHP压缩包到C:PHP(这个路径可以随意,不过以下要是用到这个路径,请相应的修改)。

2.复制C:PHP目录下的php4ts.dll及C:PHPdlls目录下的所有文件到windows的系统文件夹里,文件夹视Windows版本的不同而不同
◆如果是Windows 9x/ME则为c:windowssystem
◆如果是Windows NT/2000则为c:winntsystem32
◆如果是Windows XP/server2003则为c:windowssystem32

其中C:为你现在所使用的操作系统的系统盘,如果你目前操作系统不是安装在C:windows下,请相应做出修改。复制php.ini-dist到C:windows(XP/2003/9x/Me)或C:Winnt(2000/nt)下,并将其改名为php.ini。用记事本打开,修改一下信息:搜索extension_dir = ./ 这行,并将其路径指到你的PHP目录下的extensions目录,比如:

<ol class="dp-xml"><li class="alt"><span><span class="attribute"><font color="#ff0000">extension_dir</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">C</font></span><span>:PHPextensions </span></span></li></ol>

如若想支持更多模块,请接下面去做,如果不想的话,直接保存php.ini文件即可. PHP所支持模块很多,不过有些dll不是免费的,所以没有随PHP的压缩包一起发布,不过dlls文件夹里带的就非常多了,刚才我们已经把它们复制到 system32文件夹下了,现在我们测试看它支持多少模块。以下是我测试的结果,仅供参考,如果安装完毕后,弹出不支持xxx.dll模块的话,直接将前面分号加上去就可以了,搜索:

<ol class="dp-xml">
<li class="alt"><span><span>Windows Extensions  </span></span></li>
<li class=""><span>Note that MySQL and ODBC support is now built in, so no dll is needed for it. </span></li>
</ol>

下面都用分号在前面注释掉了支持的扩展模块,如果你想PHP支持某个模块,请将前面的“;”去掉即可,下面是我测试后的结果,一般按照下面那样去掉注释后没什么问题的:

<ol class="dp-xml">
<li class="alt"><span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_bz2</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_cpdf</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_crack</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_curl</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_db</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_dba</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_dbase</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_dbx</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_domxml</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_exif</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_fdf</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_filepro</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_gd2</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_gettext</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_hyperwave</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_iconv</span><span>.dll ;</span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_ifx</span><span>.dll ;</span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_iisfunc</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_imap</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_interbase</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_java</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_ldap</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_mbstring</span><span>.dll ;</span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_mcrypt</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_mhash</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_mime_magic</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_ming</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_mssql</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_msql</span><span>.dll ;</span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_oci8</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_openssl</span><span>.dll ;</span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_oracle</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_pdf</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_pgsql</span><span>.dll ;</span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_printer</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_shmop</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_snmp</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_sockets</span><span>.dll ;</span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_sybase_ct</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_w32api</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_xmlrpc</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_xslt</span><span>.dll </span></span></li>
<li class="alt"><span><span></span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_yaz</span><span>.dll </span><span class="attribute">extension</span><span>=</span><span class="attribute-value">php_zip</span><span>.dll </span></span></li>
</ol>

修改完成后,保存php.ini,到此完成PHP的安装和配置。


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/446504.htmlTechArticlePHP的快速发展,它的功能越来越强大,运用它也变得很方便,下面我们就PHP5安装配置详细的介绍一下。PHP的执行效率是有目共睹的,这也是...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn