从ubuntu上的laravel开始 [英] Starting with laravel on ubuntu

查看:59
本文介绍了从ubuntu上的laravel开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将laravel作为PHP框架,我已经将laravel zip解压到~/opt/xampp/htdocs/laravel中,但是当我进入localhost/laravellocalhost/laravel时,我收到一条403错误消息:

I'm trying laravel as a PHP framework, I have already extracted the laravel zip into ~/opt/xampp/htdocs/laravel but when I go to localhost/laravel or localhost/laravel I get a 403 error message saying:

禁止访问!

Access forbidden!

您无权访问所请求的对象.服务器已对其进行了读保护或不可读.

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

我读到某个地方需要编辑laravel内的storage文件夹,以便它可以可读和可写,所以我chmod -R 766 laravel/storage,但还是没有运气,我是从Ubuntu 12.04开始的,有人遇到过这个吗?

编辑
我有chmod -R 0+w laravel/storage,现在当我进入localhost/laravel时,我在那里得到了一些文件的索引,但是当我进入localhost/laravel/public/时,仍然得到了403错误,而不是预期的结果

编辑2
我已经设置了chmod -R 765 laravel/public,现在当我进入localhost/laravel/public时,我收到了此消息,这使我相信自己越来越近:

I read somewhere that I need to edit the storage folder inside of laravel so it can be readable and writable so I chmod -R 766 laravel/storage but still no luck, I'm doing this from Ubuntu 12.04 have anyone encountered this ?

EDIT
I have chmod -R 0+w laravel/storage and now when i go to localhost/laravel i get an index of some files in there, but when i go to localhost/laravel/public/ still get the 403 error, instead of the expected result

EDIT 2
I have set chmod -R 765 laravel/public and now when i get to localhost/laravel/public i get this message which leads me to believe i'm getting closer:

警告:require(/opt/lampp/htdocs/learning-laravel/laravel/laravel.php):无法打开流:权限在/opt/lampp/htdocs/learning-laravel/public/index.php中被拒绝第34行

Warning: require(/opt/lampp/htdocs/learning-laravel/laravel/laravel.php): failed to open stream: Permission denied in /opt/lampp/htdocs/learning-laravel/public/index.php on line 34

严重错误:require():无法在/opt中打开所需的'/opt/lampp/htdocs/learning-laravel/laravel/laravel.php'(include_path ='.:/opt/lampp/lib/php') /lampp/htdocs/learning-laravel/public/index.php,第34行

Fatal error: require(): Failed opening required '/opt/lampp/htdocs/learning-laravel/laravel/laravel.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/learning-laravel/public/index.php on line 34

推荐答案

最终更新
我终于解决了它,发生的事是laravel文件夹被读取保护,我要做的是设置chmod 755 -R laravel,然后设置chmod -R o+w storage,所以我感谢laravel的帮助,并感谢大家的帮助.

Final Update
I finally solved it, what happened was that the laravel folder was read protected, what i had to do was to set chmod 755 -R laravel and then chmod -R o+w storage and voila i had laravel up and running, thanks to everybody that contributed.

这篇关于从ubuntu上的laravel开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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