【问题标题】:Restiction in directory when deploy laravel app. open_basedir restriction for lang directory部署 laravel 应用时的目录限制。 lang 目录的 open_basedir 限制
【发布时间】:2020-05-21 12:08:21
【问题描述】:

我尝试在 Windows server 2018 中部署 laravel web。在我加载网页时出现错误 500。

日志文件说:

PHP 致命错误:未捕获的 ErrorException:file_exists():open_basedir 限制生效。文件(C:\inetpub\vhosts\my-web.com\resources\lang/de.json)不在允许的路径内:(C:/Inetpub/vhosts/my-web.com\;C: \Windows\Temp) 在 C:\inetpub\vhosts\my-web.com\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:23

我尝试在 Plesk 中授予所有权限,但没有帮助。我试图打印一个简单的“Hello world”并且它有效。我错过了什么吗?

我也做了 Plesk 的推荐,但没有成功。

https://support.plesk.com/hc/en-us/articles/115000278993-A-website-hosted-in-Plesk-is-not-accessible-open-basedir-restriction-in-effect-File-is-not-within-the-allowed-path-s-

PHP 版本 7.3.14 Laravel 6

【问题讨论】:

    标签: laravel web vps


    【解决方案1】:

    在 Plesk 中转到 php 设置 并将 :{WEBSPACEROOT} 添加到 open_basedir 以便 laravel 可以访问根目录下的文件。

    【讨论】:

      猜你喜欢
      • 2011-03-16
      • 2012-05-26
      • 2015-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-13
      • 1970-01-01
      相关资源
      最近更新 更多