XAMPP learning

来源:互联网 发布:英文介绍淘宝网 编辑:程序博客网 时间:2024/05/01 10:48

 

环境:jdk1.6.0_16

         win XP sp3

 

1、下载xampp-win32-1.7.4-VC6-installer.exe

 

2、安装

     自解压到指定目录,如:D:/xampp

 

     安装为windows service

 

3、启动服务apache,mysql,filezilla

 

4、elipse 配置

 

      windows=>preferences

 

                    -> php eclipse

 

       PHP External Tools, Prlject Defaults

 

5、apache 配置

 

    httpd.conf

 

     修改:#DocumentRoot "D:/dev/xampp/htdocs"
                DocumentRoot "D:/workspace/myphp"

 

     修改:#
              # This should be changed to whatever you set DocumentRoot to.
              #
                  <Directory "D:/workspace/myphp">

 

6、登陆 XAMPP

 

     http://127.0.0.1或者http://localhost

 

7、phpmyadmin

 

     通过默认主页 http://localhost 左侧的phpmyadmin导航栏进入phpmyadmin界面,可直接通过http: //localhost/phpmyadmin/进入web登陆界面,输入用户名root后直接点击登陆(密码默认为空)即可。
注:在默认状态下,phpmyadmin有两个用户名,分别是pma和root。其中,root是管理员身份,而pma则是普通用户身份,但二者在缺省状态下均无密码。

 

8、遇到的问题及解决方法

 

     1) 注意:apache默认端口80,ssl 端口443,有些软件或者程序会占用该端口,所以会启动失败。

 

     解决方法:

 

        一、netstat -ano

              查找占用80 、443的对应程序的 pid,使用taskkill 结束进程,或者通过任务管理器关闭应用程序

 

       二、修改apache默认端口

 

             httpd.conf

 

                #Listen 0.0.0.0:80
                #Listen [::]:80
                Listen  80--------------------> xx

 

 

             httpd-ssl.conf

 

                 #Listen 0.0.0.0:443
                 #Listen [::]:443
                 Listen 443------------------>xx

 

       2)

 

         Access forbidden!

                You don’t have permission to access the requested directory. There is either no index document or the      directory is read-protected.

               If you think this is a server error, please contact the webmaster.

       Error 403

             解决方法

                    <Directory />
                           Options FollowSymLinks
                           AllowOverride None
                           Order deny,allow
                           Deny from all
                   </Directory>

             修改 Deny from all 为 Deny from allow

 

     3) Can't load Perl file: D:/dev/xampp/apache/conf/extra/startup.pl

 

           产生这个异常的原因一般是perl的环境变量的问题,比如:安装oracle后,会产生perl5lib的变量,此时就会倒置启动apache时,产生错误,

解决办法:修改环境变量:在这个perl5lib 前增加xampp 中perl 的路径,D:/xampp/per/lib; D:/xampp/perl/site/lib;

          (或者删除掉也可以,最好是备份,以防oracle出问题)

修改apache/conf/extra httpd-perl.conf

   增加:

LoadFile "D:/xampp/perl/bin/perl510.dll"
LoadModule perl_module modules/mod_perl.so
PerlSwitches -T
PerlPostConfigRequire "D:/xampp/apache/conf/extra/startup.pl"


 

 

原创粉丝点击