PHP开发环境搭建

一是Eclipse+phpeclipse插件

安装phpeclipse插件地址为
http://phpeclipse.sourceforge.net/update/stable/1.2.x/

二是使用xampp

apache集成好的xampp,安装就能用了,非常方便,但是仅仅限于开发环境。部署环境的话,还是要自己去配置的。

xampp的安装参考http://www.apachefriends.org/zh_cn/xampp-linux.html#1673

这儿有一份 XAMPP 缺乏安全防护的列表:
    MySQL 管理员(root)没有密码。
    MySQL 可通过网络访问。
    ProFTPD 使用“lampp”作为用户名“nobody”的密码。
    PhpMyAdmin 可以通过网络访问。
    示例程序可以通过网络访问。
    MySQL 和 Apache 在同一个用户名(nobody)下运行。

当你使用xampp1.8.0的时候,访问phpmyadmin时,会碰到以下错误:
“Access forbidden!
New XAMPP security concept:
Access to the requested object is only available from the local network.
This setting can be configured in the file "httpd-xampp.conf".
If you think this is a server error, please contact the webmaster.
Error 403localhost
Apache/2.4.2 (Unix) OpenSSL/1.0.1c PHP/5.4.4”
解决方案如下:
vim /opt/lampp/etc/extra/httpd-xampp.conf
找到# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
   Require all granted
    Order allow,deny
    Allow from all
</Directory>
添加红色部分
然后找到
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
        Order deny,allow
#       Deny from all
#       Allow from ::1 127.0.0.0/8 \
#               fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
#               fe80::/10 169.254.0.0/16

        Allow from all
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
注释掉红色部分,添加上蓝色部分。
/opt/lampp/lampp restart重启一下xampp服务。在访问,应该就可以了,不可以的话,请留言


猜你喜欢

转载自ericchan2012.iteye.com/blog/1660164
今日推荐