skip to Main Content

I uploaded a laravel-5.8 project to a shared hosting cpanel.
The problem is when I access index.php it gives me an error 500.

Here is my project directory

I didn’t transfer the public folder yet. but it should work when access.
stage.example.com/public/ instead it displays error 500.

  • I changed the database credentials.
  • I haven’t changed the path in index.php since I didn’t move the public folder yet.
    path:index.php
  • I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7.
  • PHP >= 7.1.3
  • BCMath PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

I hope someone can help I wanted to run my laravel5.8 project in Cpanel.

3

Answers


  1. I have answered this question in another post. Have a look at it and see if helps:
    What is the easiest and quickest method to deploy a Laravel web application live?

    Login or Signup to reply.
  2. I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7

    I have no idea what “myphpadmin” is, anyway since you’re running PHP 5.6 Laravel can’t work.

    In cPanel you should have an option to select the PHP version, select the latest available, 7.3 if your cPanel is updated.

    Login or Signup to reply.
  3. If you have blank page maybe you need to change the path to the autoload.php file in index.php. This file is in vendor folder.

    Change :

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

    by

    require __DIR__.'/vendor/autoload.php';
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search