Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

giwrgos's avatar

Errors not showing in Laravel 5 App only blank page

I just uploaded the laravel project that i did on my computer on a share hosting package of godaddy with linux. I use a sub domain for this project which I fixed the locations of the path in the index.php to link with my laravel project which outsite the public_html.

Then I changed the permissions of the storage folder into 777 (also for the sub folders and files), and when I'm trying to load the page it doesn't show any error in the log files, even in the console of chrome. Can anyone help me please?

What I'm doing wrong?

[UPDATE] my stracture /laravel -> all the laravel project /public_html/private/public/ -> is the index.php of laravel

I have changed the index.php file to this require DIR.'/../../../laravel/bootstrap/autoload.php'; $app = require_once DIR.'/../../../laravel/bootstrap/app.php';

my htaccess is inside the public folder /public_html/private/ Options -MultiViews

RewriteEngine On
RewriteBase /private/public/
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

and my storage and sub folders' permissions 777 . User and group are correct

0 likes
23 replies
pmall's avatar

What I'm doing wrong?

Using shared hosting :p

A server on digital ocean cost nothing. It even has prepackaged server image with apache/php/mysql. Try it you will have way more fun.

2 likes
bestmomo's avatar

Maybe using a good shared hosting is also a good solution ^^

giwrgos's avatar

@pmall my personal projects are on digital ocean, but my client now has bought hosting from godaddy, so i have to use it :/

giwrgos's avatar

I just updated the first post with more information

pmall's avatar

Try this :

Dont change the relative path of any files. Put the data from public in public_html. So we have the regular laravel structure except public is named public_html. Put the root of your server as public_html.

Then change the path of laravel public folder by putting this in your AppServiceProvider register method :

$this->app->bind('path.public', function () {

    return base_path() . '/public_html';

});
kevdotbadger's avatar

Anything in your logs? The white screen is usually (in my experience) a permission issue on /storage (and it's sub folders).

giwrgos's avatar

@pmall i want to use sub domain for my laravel project, therefore I have added the laravel public folder into /public_html/public/private so now i have /public_html/public/private/public

@kevdotbadger there no any errors in laravels or apache log files

pmall's avatar

How is your webserver configured ?

giwrgos's avatar

@pmall i don't know, is the base linux package of godaddy. I deleted the project and tried again to upload it. I run the composer install and i got the following error

Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Generating autoload files Script php artisan clear-compiled handling the post-install-cmd event returned with an error

[RuntimeException] Error Output:

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]

then I did the following commands which php with result /usr/local/bin/php php --ini with result Configuration File (php.ini) Path: /usr/local/lib Loaded Configuration File: /usr/local/lib/php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)

then php -v with result PHP 5.4.37 (cli) (built: Feb 13 2015 16:42:51) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd., and with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

and php --ri mcrypt with result mcrypt

mcrypt support => enabled mcrypt_filter support => enabled Version => 2.5.8 Api No => 20021217 Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes => cbc cfb ctr ecb ncfb nofb ofb stream

Directive => Local Value => Master Value mcrypt.algorithms_dir => no value => no value mcrypt.modes_dir => no value => no value

can anyone find out the problem?

pmall's avatar

I mean the apache or nginx configuration. The root should be /public_html/public/private/public. Then keep the laravel files in private and don't change any path in original laravel files.

giwrgos's avatar

I have changed now the configuration. in the / directory i have created a laravel project where i have uploaded all the laravel files. inside the public_html i paste the contents of the public folder and i made this configuration require DIR.'/../laravel/bootstrap/autoload.php';

$app = require_once DIR.'/../laravel/bootstrap/app.ph $this->app->bind('path.public', function () {

return base_path() . '/public_html';

});

I will check now for apache or nginx and i will let you know

giwrgos's avatar

Godaddy is using apache. where i can find the configuration of the webserver?

pmall's avatar

You absolutely have to upload it all in one folder and do not tweak the paths. Then point your webserver to the public folder. Where ever it is.

giwrgos's avatar

@pmall ok but i cannot install laravel inside a folder like the structure that i have now?

pmall's avatar

I dont know it is overcomplicated, why don't you want to keep the original structure ? Don't add headaches to the headaches :D

giwrgos's avatar

@pmall because the root directory already has some folders like public_html, public_ftp, perl5 etc. I dont want to upload the laravel's files in the same directory, will be a mess, i want them to be separate :p

pmall's avatar

So create a subfolder but keep the same structure for the laravel project. Then you have to configure the vhost to have the laravel public folder as root.

amal's avatar

Try this:

Update storage folder permission and set DocumentRoot to 'public' directory

Thanks

kamaroly's avatar

Laravel

Are you checking Laravel's logs or Apache's logs?

Since upgrading to Laravel 4.1, I've had white screen "errors" (WSOD) when the application could not write to the log location. I've always solved this by making the app/storage directory writable by Apache (either group writable to "www-data" or world-writable - that depends on your server setup.

Laravel 4

# Group Writable (Group, User Writable)
$ sudo chmod -R gu+w app/storage

# World-writable (Group, User, Other Writable)
$ sudo chmod -R guo+w app/storage

Laravel 5

# Group Writable (Group, User Writable)
$ sudo chmod -R gu+w storage

# World-writable (Group, User, Other Writable)
$ sudo chmod -R guo+w storage

source : http://stackoverflow.com/questions/20678360/laravel-blank-white-screen

giwrgos's avatar

@lord yes first find if the permissions are fine on your storage folder and then run the command "php artisan cache:clear"

Please or to participate in this conversation.