Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
174 views
in Technique[技术] by (71.8m points)

php - Starting with laravel on ubuntu

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.

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:

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...