How to fix 500 () error?

Hi, I am new at 000webhost.
I’m trying to host a webapp but this there is an error 500() ?

Have you checked this out?

I did all those steps

Can you add this to your .htaccess?

php_flag display_errors on 

I deleted this file ! As it says in above tutorial

Create one and add the code then :slight_smile:

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

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

1 Like

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

242 is return line

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

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
Hostinger premium which allows jailed SSH access and if you require full root then look at the VPS hosting available.

1 Like

Hi @nioj!

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

Is working on localhost

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.

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?