# lnmp环境运行thinkphp5 报错open\_basedir restriction in effect

**URL:** <https://www.shiqidu.com/t/topic/275>\
**Category:** 开发调优\
**Tags:** Thinkphp\
**Created:** [2017 年11 月 10 日 10:00 UTC](https://www.shiqidu.com/t/topic/275 "2017-11-10T10:00:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![Eureka](https://www.shiqidu.com/user_avatar/www.shiqidu.com/eureka/32/5_2.png) [@Eureka](https://www.shiqidu.com/u/Eureka)\
发布日期： [2017 年11 月 10 日 10:00 UTC](https://www.shiqidu.com/t/topic/275/1 "2017-11-10T10:00:06Z")

</div>

打开你站点的配置文件

比如 `www.shiqidu.com.conf`

找到折行

```bash
fastcgi_param PHP_VALUE open_basedir=$document_root:/tmp/:/proc/;    

```

改为

```bash
fastcgi_param PHP_VALUE open_basedir=[你的项目目录public的上级]/:/tmp/:/proc/;    

```
