Laravel: Frustating CPanel Shared Hosting Configuration – 500 Internal Server Error [closed]-Collection of common programming errors

I successfully learned Laravel in my Virtual Host. But, when I upload it into my shared hosting CPanel & WHM 10 days ago… I still stuck with this problem until now. I have been searching for solution, but nothing suitable for me. I feel hopeless. Many of the questions are stated very difficult to configure Laravel especially for shared hosting. I think Laravel should consider of this. Maybe a thousand people out there facing the same problem like me.

Well… I this is my problem, I write in detail;

  1. I uploaded my project to ‘CPanel’ shared hosting, I got this error page

    Forbidden
    
    You don't have permission to access / on this server.
    
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    
  2. I move /public/.htaccess to /.htaccess. And I’ve got this error page

    Forbidden
    
    You don't have permission to access / on this server.
    
    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
    
  3. I edit my .htaccess file like below;

    
        Options +FollowSymLinks
        RewriteEngine On
    
    
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ public/index.php/$1 [L] #I EDIT THIS SECTION FROM index.php to public/index.php
    
    

    note: I know, this is not good configuration because of security reason. But I try the simples method. If I make this, I will configure more secure

    And I got this error;

    Unhandled Exception
    
    Message:
    
    Directive 'safe_mode' is deprecated in PHP 5.3 and greater
    Location:
    
    Unknown on line 0
    
  4. I can’t edited php.ini because I don’t have an authorize. So I edit my .htaccess just like below

    php_value safe_mode off #I ADDED THIS LINE
    
    
        Options +FollowSymLinks
        RewriteEngine On
    
    
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ public/index.php/$1 [L]
    
    

    And I get this error page;

    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    
    More information about this error may be available in the server error log.
    
    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
    
  5. I have learned so far about the above error is due to an error page permision files / folders on hosting. On Laravel documentation page, storage/views must be writable.

    I try this configuration;

    • I let the storage permission to 755 and I change the storage/views permission to 775. Error page is the same
    • I let the storage permission to 755 and I change the storage/views permission to 777. Error page is the same
    • I change the storage permission to 775 and I change the storage/views permission to 775. Error page is the same
    • I change the storage permission to 777 and I change the storage/views permission to 775. Error page is the same
    • storage 775, storage/views 777
    • storage 777, storage/views 777