apeblog/public/doc/常见问题.md

2.3 KiB
Raw Blame History

常见问题

1、安装失败可能存在php配置文件禁止了putenvproc_open函数。解决方法,查找php.ini文件位置,打开php.ini,搜索disable_functions项,看是否禁用了putenvproc_open函数。如果在禁用列表里,移除putenv proc_open然后退出重启php即可。

2、如果安装后打开页面提示404错误,请检查服务器伪静态配置,如果是宝塔面板,网站伪静态请配置使用thinkphp规则

伪静态配置如下:

Nginx

修改nginx.conf 配置文件 加入下面的语句。

location /admin/ {
    index  index.php index.html index.htm;
     if (!-e $request_filename){
        rewrite ^/admin/(.*)$ /admin.php?s=$1;
     }
}
location /api/ {
      index  index.php index.html index.htm;
       if (!-e $request_filename){
          rewrite ^/api/(.*)$ /api.php?s=$1;
       }
}
location / {
  index  index.php index.html index.htm;
  if (!-e $request_filename){
      rewrite ^/(.*)$ /index.php?s=$1 last;
  }    
}

Apache

把下面的内容保存为.htaccess文件放到应用入 public 文件的同级目录下。

<IfModule mod_rewrite.c>
    Options +FollowSymlinks -Multiviews
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^admin/(.*)$ admin.php?s=$1;
    RewriteRule ^api/(.*)$ api.php?s=$1;
    RewriteRule ^(.*)$ index.php?s=$1 [L]
</IfModule>

3、如果提示当前权限不足无法写入配置文件config/database.php,请检查database.php是否可读还有可能是当前安装程序无法访问父目录请检查PHP的open_basedir配置。

4、如果composer install失败,请尝试在命令行进行切换配置到国内源,命令如下:

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

复制

5、如果composer install失败请尝试composer降级

composer self-update 

复制

6、如果composer install失败,请尝试删除项目文件,重新拉取。

7、访问 http://www.yoursite.com/install/index ,请注意查看伪静态请配置是否设置了thinkphp规则

8、遇到问题请到QQ1099438829 反馈,或者到Issue里面反馈,谢谢!