mirror of https://github.com/1099438829/apeblog
72 lines
2.3 KiB
Markdown
72 lines
2.3 KiB
Markdown
# 常见问题
|
||
|
||
1、安装失败,可能存在php配置文件禁止了`putenv`和`proc_open`函数。解决方法,查找`php.ini`文件位置,打开`php.ini`,搜索`disable_functions`项,看是否禁用了`putenv` 和`proc_open`函数。如果在禁用列表里,移除`putenv` `proc_open`然后退出,重启php即可。
|
||
|
||
2、如果安装后打开页面提示`404`错误,请检查服务器伪静态配置,如果是宝塔面板,网站伪静态请配置使用`thinkphp规则`。
|
||
|
||
**伪静态配置如下:**
|
||
|
||
**Nginx**
|
||
|
||
修改nginx.conf 配置文件 加入下面的语句。
|
||
|
||
```shell
|
||
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 文件的同级目录下。
|
||
|
||
```shell
|
||
<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`失败,请尝试在命令行进行切换配置到国内源,命令如下:
|
||
|
||
```shell
|
||
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
|
||
```
|
||
|
||
复制
|
||
|
||
5、如果`composer install`失败,请尝试composer降级:
|
||
|
||
```shell
|
||
composer self-update
|
||
```
|
||
|
||
复制
|
||
|
||
6、如果`composer install`失败,请尝试删除项目文件,重新拉取。
|
||
|
||
7、访问 [http://www.yoursite.com/install/index](http://www.yoursite.com/install/index) ,请注意查看伪静态请配置是否设置了`thinkphp规则`。
|
||
|
||
8、遇到问题请到QQ:**1099438829** 反馈,或者到**Issue**里面反馈,谢谢! |