laravel5: chdir(): 没有那个文件或目录 (errno 2) [英] laravel5: chdir(): No such file or directory (errno 2)

查看:21
本文介绍了laravel5: chdir(): 没有那个文件或目录 (errno 2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将 laravel 5 上的网站构建部署到 VPS 服务器时遇到问题,但在本地机器上它工作正常.

I have a problem when deploy website build on laravel 5 into VPS server, but on local machine it work fine.

我的页面是 http://easyway.vn/ 当前页面显示空白并有错误

My page is http://easyway.vn/ current page display blank with error

加载资源失败:服务器响应状态为 500(内部服务器错误)

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

当我跑步时

php artisan serve --host=0.0.0.0

php artisan serve --host=0.0.0.0

我有一个错误

[错误异常]
chdir(): 没有那个文件或目录 (errno 2)

[ErrorException]
chdir(): No such file or directory (errno 2)



服务器信息



Server Info

操作系统:Linux 2.6
服务器版本:Apache/2.2.29 (Unix)
PHP 5.4.41 (cli)(构建时间:2015 年 6 月 4 日 13:27:02)版权所有 (c) 1997-2014 The PHP GroupZend Engine v2.4.0,版权所有 (c) 1998-2014 Zend Technologies

OS: Linux 2.6
Server version: Apache/2.2.29 (Unix)
PHP 5.4.41 (cli) (built: Jun 4 2015 13:27:02) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

请帮帮我!

推荐答案

这意味着你的 Laravel 应用程序无法找到公共文件夹.

it means that your Laravel Application Can't Find the public folder.

我让它工作了

改变:

chdir($this->laravel->publicPath());

在:

vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php

致:

chdir('/');

这篇关于laravel5: chdir(): 没有那个文件或目录 (errno 2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆