宝塔部署时,出现“open_basedir restriction in effect”错误

使用插件 Markdown Plugin for Typecho

**Warning**: require_once(): open_basedir restriction in effect. File(/www/wwwroot/x.x.x.x) is not within the allowed path(s): (/www/wwwroot/x.x.x.x/typecho/:/tmp/) in **/www/wwwroot/1.95.154.20/typecho/usr/plugins/MarkdownParse/Plugin.php** on line **5**

解决方式

以下有两种解决方案:

方案1:去掉网站目录下的勾选,防跨站攻击(open_basedir),然后重启php服务。

微信截图_20211219164619.png

方案2:修改目录下的.user.ini的隐藏文件,去掉public目录地址

微信截图_20211219164909.png

最后修改:2025 年 03 月 28 日
如果觉得我的文章对你有用,请随意赞赏