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

kamish's avatar

laravel 4 on shared hosting

Hey I tried through the tutorial I found online post on a shared hosting laravel but I can not see anything and get a blank page . No error and no explanation .

Is it possible to view the shared application hosting LARAVEL?

.htacses in httpdocs Folder:

'''

RewriteEngine on RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L] '''

index.php in public folder:

'''

require DIR.'/../bootstrap/autoload.php';

$app = require_once DIR.'/../bootstrap/start.php';

'''

access_log:

'''

16/Oct/2014:14:42:57 -0200] "GET / HTTP/1.1" 500 178 "-" "Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20110814 Firefox/6.0 Google favicon" - - [16/Oct/2014:14:42:57 -0200] "GET / HTTP/1.1" 500 178 "http://www.google.com/search" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko; Google Web Preview) Chrome/27.0.1453 Safari/537.36" - - [16/Oct/2014:14:45:45 -0200] "GET / HTTP/1.1" 500 178 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36" - - [16/Oct/2014:14:45:46 -0200] "GET /favicon.ico HTTP/1.1" 200 313 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36"

'''

0 likes
13 replies
thepsion5's avatar

You'll need to check your error log to see what's keeping the application from running.

1 like
bashy's avatar

Check error_log or php5-fpm.log if you have it (shared hosting is a bitch)

1 like
theilen's avatar

Make sure app/storage (or storage if you're on Laravel 5) is writeable.

And you could try to set debug to true.

But yeah, shared hosting can be an utter bitch. My preferred hosting provider still uses PHP4 on the CLI by default. Great for using composer...

1 like
InFloW's avatar

Laravel should work fine on shared web hosting. You shouldn't need to change anything in the public folder either. If you're on a cPanel server for example all you would need to do is

ln -s /home/username/myproject/public /home/username/public_html

Replace username with your username and myproject with wherever you placed the project. I'm not sure what tutorial you used but it is pretty easy to get Laravel up and going on shared web hosting. Five total commands from SSH and that would include installing composer.

1 like
henrique's avatar

Not all shared hosting gives ssh access. How did you install your application? (uploading a tar.gz using cPanel file explorer and extracting it? FTP? ssh access with git? Maybe linking that tutorial may help us find the error)

I can only think of two possibilities: 1- permission error on storage folder, which is a little rare on shared hosting but can happen if you generate a tar, since tar copy permissions, it may send the files with 700 permissions, check storage folder permission. 2- you didn't upload your vendor folder nor did you run composer install

1 like
kamish's avatar

I gave in and bought a VPS server , but now after I installed LARAVEL get a blank page . Installation was written that requires LARAVEL PHP version 5.4 and higher , but when I print PHP INFO I get a blank page in index.php too . Does anyone have an idea how to solve this problem?

bashy's avatar

Have you installed PHP >= 5.4? What have you done so far or what comes installed on your VPS?

1 like
kamish's avatar

After a sleepless night I was able to successfully install laravel. It was quite challenging for me but I guess they all go through it to be better programmers

lafi_mostafa2015's avatar

Hello everyone! First of all, thank you very much for your time. I'm having a problem with laravl4, and I hope someone would be so kind to help me,i'm not understand this problem :

196.2.80.124 - - [13/Apr/2015:18:20:00 +0100] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36" 196.2.80.124 - - [13/Apr/2015:18:20:07 +0100] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36" 192.168.200.121 - - [13/Apr/2015:18:21:18 +0100] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36" 192.168.200.121 - - [13/Apr/2015:18:21:19 +0100] "GET /favicon.ico HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36" 192.168.200.121 - - [13/Apr/2015:18:23:53 +0100] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36" 192.168.200.121 - - [13/Apr/2015:18:24:11 +0100] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36" 192.168.200.85 - - [13/Apr/2015:18:27:11 +0100] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.1; rv:37.0) Gecko/20100101 Firefox/37.0" 192.168.200.85 - - [13/Apr/2015:18:28:05 +0100] "GET /index.php HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 6.1; rv:37.0) Gecko/20100101 Firefox/37.0"

Do you have any idea why? Thanks so much for your help!

lafi_mostafa2015's avatar

Really thank you very much bashy :) it's worked I have not thought has that .. thank you another time.

lafi_mostafa2015's avatar

Hello everyone! First of all, thank you very much for your time. I'm having a problem with laravl4 look this url : http://www.serfigroupmaroc.com/dashboard Class BackController does not exist; i've executed this commande but i've the same problem: php artisan dump-autoload

can you help me please ?

Best Regards,

Please or to participate in this conversation.