PHP5.3.1安装教程[基于Windows下Apache]_PHP教程

WBOY
Freigeben: 2016-07-13 17:39:02
Original
827 Leute haben es durchsucht

  学习PHP这么久了,昨天发现WAMP已经更新了好几个版本了,我的版本已经很旧了,当然版本并不重要,为

  了复习一下WAMP的配置方法,我在虚拟机中手动和自动配置了下,都是下载最新的推荐版本,原来并没想到

  发到坛子来,所以并没有截图,后来总结到记事本的时候发现还是有蛮多问题的,所以就共享出来,希望对大家

  有所帮助。在做实验的时候,我也参考了坛子里其他的前辈写的教程,在此多谢了。步骤写得比较简略,但重要

  的东西基本都写出来了,有不明白的可以借助搜索引擎,如果我在线,我也会尽力解答的。

       PHP5.3.1 安装配置视频教程

  安装过程如下:

  ①手动安装:

  (1)按提示安装Apache 2.2.14,有两种版本(具体有什么区别网上有答案),都行的,安装在C:WAMPApache2.2.14。

  (2)解压php-5.3.1-Win32-VC6-x86.zip(选择VC6,Thread Safe版本)到C:WAMPPHP5.3.1中。

  (3)打开httpd.conf,添加以下三行:

  LoadModule php5_module C:/WAMP/PHP5.3.1/php5apache2_2.dll

  PHPIniDir "C:/WAMP/PHP5.3.1"

  AddType application/x-httpd-php .php .phtml

  找到

  

  DirectoryIndex index.html

  

  改为:

  

  DirectoryIndex index.html index.php

  

  (4)设置环境变量:C:WAMPPHP5.3.1;C:WAMPPHP5.3.1ext;

  还可以把C:WAMPApache2.2.14in也添加进去,这样如果Apache出错就可以

  直接在命令控制台中打命令调试。

  (5)修改php.ini:

  找到extension_dir,设置为extension_dir = "C:/WAMP/PHP5.3.1/ext"

  找到以下extension:

  ;extension=php_gd2.dll

  ;extension=php_mbstring.dll

  ;extension=php_mysql.dll

  ;extension=php_mysqli.dll

  去掉之前的分号。这个根据需要去掉前面的分号。

  (6)重启Apache,写个有PHP语句的php网页测试。

  (7)解压mysql-noinstall-5.1.41-win32.zip到C:WAMPMySQL5.1.41中

  (8)把my-large.ini改名为my.ini,找到[mysqld]添加如下语句:

  #set default language

  default-character-set=gbk

  #set basedir to your installation path

  basedir=C:/WAMP/MySQL5.1.41

  #set datadir to the location of your data directory

  datadir=C:/WAMP/MySQL5.1.41/data

  (9)先设置环境变量:C:WAMPMySQL5.1.41in,然后打开命令窗口,输入:

  mysqld --install MySQL --defaults-file=C:WAMPMySQL5.1.41my.ini

  安装完成后在命令窗口输入:mysql -u root

  设置root帐户密码:set password for root@localhost = password(123456);

  这样之后就可以使用mysql了,重启Apache,写个php网页测试。

  (10)根据提示安装ZendOptimizer-3.3.0a-Windows-i386.exe。

  (11)解压phpMyAdmin-3.2.4到C:WAMPApachehtdocsphpMyAdmin中。

  (12)打开文件config.sample.inc.php,寻找到代码行:

  // $cfg[Servers][$i][controluser] = pma;

  // $cfg[Servers][$i][controlpass] = pmapass;

  改为:

  $cfg[Servers][$i][controluser] = root;

  $cfg[Servers][$i][controlpass] = 123456;

  注意:如果需要通过远程服务器调试使用phpMyAdmin,不能让blowfish_secret内容为空。

  可以随便设置一个字符串。

  (13)以config.inc.php保存在同一目录下,现在可以在浏览器中使用phpMyAdmin了。

  至此,手动安装完毕。

  ************************************************************************************

  #####################################################################

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  ②自动安装:

  (1)按提示安装Apache 2.2.14,有两种版本(具体有什么区别网上有答案),都行的,安装在C:WAMPApache2.2.14。

  (2)运行php-5.3.1-Win32-VC6-x86.msi(选择VC6,Thread Safe版本),安装在C:WAMPPHP5.3.1中。

  (3)安装完后在网上找到ntwdblib.dll这个文件,放在C:WAMPPHP5.3.1目录中(不推荐这种做法)。

  或者打开php.ini,注释掉下面的一句(就是在前面加个分号,如果已经被注释了那更好):

  extension=php_mssql.dll

  然后重启Apache,这时应该就可以了(如果直接重启Apache,有可能出错)。

  写个php网页测试下。

  (4)运行mysql-5.1.41-win32.msi,安装在C:WAMPMySQL5.1.41中。

  (5)重启Apache,新建一个php网页,连接一下MySQL以验证是否安装成功。

  (6)解压phpMyAdmin-3.2.4到C:WAMPApachehtdocsphpMyAdmin中。

  (7)打开文件config.sample.inc.php,寻找到代码行:

  // $cfg[Servers][$i][controluser] = pma;

  // $cfg[Servers][$i][controlpass] = pmapass;

  改为:

  $cfg[Servers][$i][controluser] = root;

  $cfg[Servers][$i][controlpass] = 123456;

  注意:如果需要通过远程服务器调试使用phpMyAdmin,不能让blowfish_secret内容为空。

  可以随便设置一个字符串,最好是设置一个字符串。

  (8)以config.inc.php保存在同一目录下,现在可以在浏览器中使用phpMyAdmin了。

  至此,自动安装完毕。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/486432.htmlTechArticle学习PHP这么久了,昨天发现WAMP已经更新了好几个版本了,我的版本已经很旧了,当然版本并不重要,为 了复习一下WAMP的配置方法,我在虚...
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!