将laravel应用上传到互联网时出错

时间:2018-07-15 17:26:59

标签: php laravel

我在上传laravel应用程序时遇到这些错误。

Warning:
  require(): open_basedir restriction in effect. 
  File(/usr/home/PerQuiS/domains/www.perquis.pl/fibazy/vendor/autoload.php) 
  is not within the allowed path(s):
  (/usr/home/PerQuiS/domains/www.perquis.pl/public_html:
  /tmp:/usr/share:/usr/local/share/pear:/dev)
  in /usr/home/PerQuiS/domains/www.perquis.pl/public_html/index.php on line 24 
Warning: 
  require(/usr/home/PerQuiS/domains/www.perquis.pl /fibazy/vendor/autoload.php):
  failed to open stream: Operation not permitted in
  /usr/home/PerQuiS/domains/www.perquis.pl/public_html/index.php on line 24 
Warning:
  require(): open_basedir restriction in effect. 
  File(/usr/home/PerQuiS/domains/www.perquis.pl/fibazy/vendor/autoload.php) 
  is not within the allowed path(s):
  (/usr/home/PerQuiS/domains/www.perquis.pl/public_html: 
  /tmp:/usr/share:/usr/local/share/pear:/dev) in
  /usr/home/PerQuiS/domains/www.perquis.pl/public_html/index.php on line 24 
Warning: 
  require(/usr/home/PerQuiS/domains/www.perquis.pl/ fibazy/vendor/autoload.php):
  failed to open stream: Operation not permitted in
  /usr/home/PerQuiS/domains/www.perquis.pl/public_html/index.php on line 24 
Fatal error:
  require(): Failed opening required 
  '/usr/home/PerQuiS/domains/www.perquis.pl/public_html/.. 
  /fibazy/vendor/autoload.php'
  (include_path='.:/usr/local/share/pear') in 
  /usr/home/PerQuiS/domains/www.perquis.pl/public_html/index.php on line 24

2 个答案:

答案 0 :(得分:0)

如果您有权访问该域的open_basedir设置,请将其设置为:/tmp:/usr/share:/usr/local/share/pear:/dev:/usr/home/PerQuiS/domains/www.perquis.pl/

答案 1 :(得分:0)

如果您正在使用共享主机,则使Laravel不仅适用于目录功能,还会遇到问题。

我强烈建议将laravel forge与Digital Ocean或AWS结合使用。这将为您节省大量时间,而到了扩展规模时,它将容易得多。我知道定价不会贵很多,而您真正得到的是硬件方面的费用。