常见问题

新增站点报错You don't have permission to access/on this server

新增站点报错You don’t have permission to access/on this server,

解决方法如下:

  1. 网站目录的权限

  2. 配置文件是否与下面的范例保持一致,特别是“AllowOverride All Require all granted”写法务必一样

    <VirtualHost *:80>
    ServerName www.mydomain.com 
    ServerAlias mydomain.com 
    
    DocumentRoot "C:\wwwroot\mysite1"
    ErrorLog "/var/log/httpd/mysite1_error_apache.log"
    CustomLog "/var/log/httpd/mysite1_apache.log" common
    <Directory "C:\wwwroot\mysite1">
    Options Indexes FollowSymlinks
    AllowOverride All
    Require all granted
    </Directory>
    </VirtualHost>
    

如何解决PHP的http-proxy漏洞?

http://bbs.websoft9.com/forum.php?mod=viewthread&tid=149

如何切换PHP版本

http://bbs.websoft9.com/forum.php?mod=viewthread&tid=149 仅做参考。

解决ignoring unsupported language code错误 {#ignoring-unsupported-language-code}

连接phpMyAdmin,提示 ignoring unsupported language code 这就是传说中的“phpMyAdmin版本越新,bug越多”,pma4.6系列的界面对中文的支持一向是不好的,4.6.0就出现了简体中文和繁体中文设置无效的情 况,4.6.1干脆就开始报错。由于pma会自动检测浏览器的语言环境来设置自身的语言,中文版的浏览器下面pma会自动触发中文设置,造成上图的错误。

  • 用编辑器打开phpMyAdmin中的libraries目录下面的config.default.php,在2566行附近找到 $cfg[‘Lang’] = ‘ ‘; 在单引号里面填入“en”(不含引号),完成之后保存文件。
    /** * Force: always use this language, e.g. 'en' * * @global string $cfg[‘Lang’] */ $cfg[‘Lang’] = ‘en’;
  • 确认保存成功,重新尝试进入phpMyAdmin的登陆界面,报错界面不再出现。

更好的修改方法:直接下载phpMyAdmin4.5之前版本或最新版本,替换掉有bug的新版本。默认phpmyadmin所在目录C:\websoft9\wampstack\apps\phpmyadmin\htdocs

如何设置phpMyAdmin只允许在127.0.0.1访问?

WAMP环境上,默认已经开启远程连接phpMyAdmin管理数据库。那么如何修改,可以使得远程不能管理数据库呢?

  1. 备份C:\websoft9\wampstack-7.0.26-1\apps\phpmyadmin\conf目录下的httpd-app.conf文件,确保修改出错时能够快速改回来;

  2. 修改httpd-app.conf文件内容,将Require local前面加上#号,增加Require all granted一条规则,参考如下:

    <Directory "C:\websoft9\wampstack-7.0.26-1/apps/phpmyadmin/htdocs">    
    # AuthType Basic
    # AuthName phpMyAdmin
    # AuthUserFile "C:/websoft9/wampstack-7.0.26-1/apache2/users"
    # Require valid-user
    AllowOverride None
    php_value upload_max_filesize 80M
    php_value post_max_size 80M
    
    <IfVersion < 2.3 >
    Order allow,deny
    Allow from 127.0.0.1
    Satisfy all
    </IfVersion>
    <IfVersion >= 2.3>
    #Require local
    Require all granted
    </IfVersion>
    ErrorDocument 403 "For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname."    
    </Directory>
    
  3. 重新启动Apache服务后生效