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.
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
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?
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.
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 :
by