How to fix 500 () error?


#1

Hi, I am new at 000webhost.
I’m trying to host a webapp but this there is an error 500() ?
https://e-teacher-app.000webhostapp.com


#2

Have you checked this out?


#3

I did all those steps


#4

Can you add this to your .htaccess?

php_flag display_errors on 

#5

I deleted this file ! As it says in above tutorial


#6

Create one and add the code then :slight_smile:


#7

It says :
Parse error: syntax error, unexpected ‘?’ in /storage/ssd1/398/7320398/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 242


#8

Can you paste the helpers.php file here or browse to line 242 and copy/paste it here


#9

if (is_string($arguments[0])) {
return app(‘cache’)->get($arguments[0], $arguments[1] ? null);
}

242 is return line


#10

Those errors are because I develope that laravel app in PHP7.1 and here I changed php version to 5.6, because was not working in php7.1 neither


#11

Looking around Laracasts/Laravel Support they do not recommend running Laravel on shared hosting (000webhost is free shared hosting basically), they don’t recommend running it on any PHP version lower than 7 ideally.
They recommend having SSH access to run commands to correctly install and secure your Laravel setup. (000webhost doesn’t provide SSH)

I would recommend you take a look at getting https://www.hostinger.com/special/000webhost
Hostinger premium which allows jailed SSH access and if you require full root then look at the VPS hosting available.


#13

Hi @nioj!

Could you please confirm your app is working on another server setup?


#14

Is working on localhost


#15

I don’t know what could be the cause of this issue.

Parse error: syntax error, unexpected ‘?’ in /storage/ssd1/398/7320398/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 242

This indicates that the PHP version you use to run your app on is lower then 7.0, and it was in the moment I checked your site. I have switched it to 7.1 but another error which is not showing is now popping up, causing ‘Application Error 500’. I will personally try some tests with your site and get back to you with an answer as soon as possible.


#16

I don’t know why the app is failing. I see no valid reason. Maybe it’s because it’s exceeding some limitations :confused:

What other dependency packages are you using?