简体   繁体   中英

Laravel 5.1 install on Ubuntu white screen no errors in laravel.log and .env file exists

I have been struggling with this for days now, to the point where I have visited every link on stack laravel.io and laracasts and still no luck

Permissions on storage and bootstrap/cache changed to 777

When I browse to the welcome page on my app the result in inspector is 'get 200' for the pretty url

Artisan is functioning, key has been generated added to .env and app.php

No errors in apache log

I have upgraded php in Ubuntu 14.04 to version 5.6.14 mcrypt is installed

Would be really grateful if someone could shed some light on this

Apache DocumentRoot

Seems like you are not shown the laravel page. Try to put something like the following in the public/index.php file of your laravel installation (at the beginning of the file):

<?php
    die('Laravel index file');

If you browse to your site and don't see the text Laravel index file , your document root is pointing somewhere else. As you are using Apache see for example the configuration of virtual hosts in Ubuntu .

Note, that the document root should point to the public directory of your laravel installation, not the root directory of your laravel installation (so eg /home/user/public_html/my_laravel_app/ public instead of /home/user/public_html/my_laravel_app )

Laravel routes

EDIT: As you said, you saw the text, the next step for me would be to check the routes. Have a look at your app/Http/routes.php . What file is included for your request?

<?php

Route::get('/', function () {
    return view('welcome');
});

The above route would include resources/views/welcome.blade.php (or resources/views/welcome.php ) for your request to http://localhost (or whatever your host looks like). Try to insert debugging information at the beginning of the welcome.blade.php, eg

welcome.blade.php

<h1>Welcome.blade.php</h1>

Check if you can see the above text on your web request.

Other ideas

Maybe it would be useful to also have the following information:

  • Your apache config file
  • Path to your laravel app
  • Path to your info.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM