Error laravel blank page in hosting

-1

I have the files of my web page developed in laravel in my hosting, for some reason when I address the index.php that is inside the folder public_html, the page is not loaded, it is blank. I check and the network tab in browser developer tools and I realize that it is a 500 error. When checking the error_log of my hosting it tells me the following:

[16-Jul-2017 21:03:03] PHP Warning:  Unexpected character in input:  '\'   (ASCII=92) state=1 in /home3/sqngolfc/public_html/index.php on line 49
[16-Jul-2017 21:03:03] PHP Parse error:  syntax error, unexpected T_STRING in /home3/sqngolfc/public_html/index.php on line 49

My version of php is 5.6.29

My index.php is:

<?php

/**
* Laravel - A PHP Framework For Web Artisans
*
* @package  Laravel
* @author   Taylor Otwell <[email protected]>
*/

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
|
*/

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

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../markuno/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

My .htaccess is:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

The php version according to composer is "php": "> = 5.6.4" I do not know if this has anything to do with.

    
asked by Jesus 17.07.2017 в 05:35
source

2 answers

0

I would recommend you always use the minimum version of PHP 7.0.

How have you done the "deploy" of the application? Via FTP? Have you done a composer install to verify that all the necessary packages are installed?

Have you checked that the PHP version of the terminal is the same as the one you are running on the web? Some control panels (Plesk for example) have different versions for the terminal than for the PHP execution of the web.

You can see it better with a <?php phpinfo() ?> .

In case that is not the problem, please, give us more information about the server, PHP versions, if it has a panel or not, etc.

    
answered by 17.07.2017 / 11:02
source
0

The solution was to update the php version running on the server, mediating the cpanel.

    
answered by 18.07.2017 в 04:48