Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_PARSE)
syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)" Stacktrace: #1 Symfony\Component\Debug\Exception\FatalThrowableError in /home/hireweba/public_html/shoutboard/app/Providers/ApiServiceProvider.php:15 #0 {main} in /home/hireweba/public_html/shoutboard/index.php:0
Stack frames (2)
1
Symfony\Component\Debug\Exception\FatalThrowableError
/app/Providers/ApiServiceProvider.php15
0
{main}
/index.php0
<?php

namespace Strimoid\Providers;

use Dingo\Api\Routing\Router;
use Illuminate\Support\ServiceProvider;

class ApiServiceProvider extends ServiceProvider
{
    /**
     * This namespace is applied to the controller routes in your routes file.
     *
     * In addition, it is set as the URL generator's root namespace.
     */
    protected string $namespace = 'Strimoid\Api\Controllers';

    /**
     * Bootstrap any application services.
     *
     */
    public function boot(Router $api): void
    {
        $path = app_path('Api/routes.php');

        $api->version('v1', ['namespace' => $this->namespace, 'middleware' => 'bindings'], function ($api) use ($path): void {
            require $path;
        });
    }

    /**
     * Register the service provider.
     *
     */
    public function register(): void
    {
        //
    }
}
 
Arguments
  1. "syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)"
    
<?php

/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <taylor@laravel.com>
 */

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| 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 great to relax.
|
*/

require __DIR__.'/vendor/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__.'/bootstrap/app.php';

/*

Environment & details:

empty
empty
empty
empty
empty
Key Value
PATH
"/usr/local/bin:/bin:/usr/bin"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_ENCODING
"br,gzip"
HTTP_ACCEPT_LANGUAGE
"en-US,en;q=0.5"
HTTP_CONNECTION
"Keep-Alive"
HTTP_HOST
"hirewebagency.com"
HTTP_USER_AGENT
"CCBot/2.0 (https://commoncrawl.org/faq/)"
DOCUMENT_ROOT
"/home/hireweba/public_html"
REMOTE_ADDR
"3.236.150.211"
REMOTE_PORT
"52198"
SERVER_ADDR
"72.18.134.36"
SERVER_NAME
"hirewebagency.com"
SERVER_ADMIN
"webmaster@hirewebagency.com"
SERVER_PORT
"80"
REQUEST_SCHEME
"http"
REQUEST_URI
"/shoutboard/"
SCRIPT_FILENAME
"/home/hireweba/public_html/shoutboard/index.php"
QUERY_STRING
""
SCRIPT_URI
"http://hirewebagency.com/shoutboard/"
SCRIPT_URL
"/shoutboard/"
SCRIPT_NAME
"/shoutboard/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
X-LSCACHE
"on"
PHP_SELF
"/shoutboard/index.php"
REQUEST_TIME_FLOAT
1593728340.4207
REQUEST_TIME
1593728340
APP_ENV
"production"
APP_LOCALE
"en"
APP_DEBUG
"true"
APP_KEY
"base64:w9teGk41JDU/SYFs/2PhjGSRABsa75get7CPlzLfjOk="
APP_URL
"http://hirewebagency.com/shoutboard"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"hireweba_shoutboard"
DB_USERNAME
"hireweba_shoutb"
DB_PASSWORD
"qfZ7nF@652XJ"
BASE_URL
"http://hirewebagency.com/shoutboard"
CDN_URL
"http://cdn.strimoid.dev"
CACHE_DRIVER
"array"
EMAIL_DRIVER
"log"
MAIL_HOST
""
MAIL_PORT
""
MAIL_ENCRYPTION
""
MAIL_USERNAME
""
MAIL_PASSWORD
""
PUSHER_KEY
""
PUSHER_SECRET
""
PUSHER_ID
""
NOCAPTCHA_SECRET
""
NOCAPTCHA_SITEKEY
""
Key Value
PATH
"/usr/local/bin:/bin:/usr/bin"
APP_ENV
"production"
APP_LOCALE
"en"
APP_DEBUG
"true"
APP_KEY
"base64:w9teGk41JDU/SYFs/2PhjGSRABsa75get7CPlzLfjOk="
APP_URL
"http://hirewebagency.com/shoutboard"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"hireweba_shoutboard"
DB_USERNAME
"hireweba_shoutb"
DB_PASSWORD
"qfZ7nF@652XJ"
BASE_URL
"http://hirewebagency.com/shoutboard"
CDN_URL
"http://cdn.strimoid.dev"
CACHE_DRIVER
"array"
EMAIL_DRIVER
"log"
MAIL_HOST
""
MAIL_PORT
""
MAIL_ENCRYPTION
""
MAIL_USERNAME
""
MAIL_PASSWORD
""
PUSHER_KEY
""
PUSHER_SECRET
""
PUSHER_ID
""
NOCAPTCHA_SECRET
""
NOCAPTCHA_SITEKEY
""
0. Whoops\Handler\PrettyPageHandler
Whoops! There was an error.
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_PARSE)
syntax error, unexpected 'Throttle' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "syntax error, unexpected 'Throttle' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)" Stacktrace: #0 Symfony\Component\Debug\Exception\FatalThrowableError in /home/hireweba/public_html/shoutboard/app/Http/Middleware/RateLimit.php:12
Stack frames (1)
0
Symfony\Component\Debug\Exception\FatalThrowableError
/app/Http/Middleware/RateLimit.php12
<?php

namespace Strimoid\Http\Middleware;

use Closure;
use GrahamCampbell\Throttle\Throttle;
use Illuminate\Http\Request;
use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;

class RateLimit
{
    protected Throttle $throttle;

    public function __construct(Throttle $throttle)
    {
        $this->throttle = $throttle;
    }

    public function handle(Request $request, Closure $next)
    {
        if ($this->isEnabledFor($request)) {
            $limit = 25; // request limit
            $time = 10; // ban time

            if (false === $this->throttle->attempt($request, $limit, $time)) {
                throw new TooManyRequestsHttpException($time * 60, 'Rate limit exceed.');
            }
        }

        return $next($request);
    }

    protected function isEnabledFor(Request $request): bool
    {
        // Limit only POST requests
        if ($request->getMethod() != 'POST') {
            return false;
        }

        // Disable throttle limit for voting
Arguments
  1. "syntax error, unexpected 'Throttle' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
PATH
"/usr/local/bin:/bin:/usr/bin"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_ENCODING
"br,gzip"
HTTP_ACCEPT_LANGUAGE
"en-US,en;q=0.5"
HTTP_CONNECTION
"Keep-Alive"
HTTP_HOST
"hirewebagency.com"
HTTP_USER_AGENT
"CCBot/2.0 (https://commoncrawl.org/faq/)"
DOCUMENT_ROOT
"/home/hireweba/public_html"
REMOTE_ADDR
"3.236.150.211"
REMOTE_PORT
"52198"
SERVER_ADDR
"72.18.134.36"
SERVER_NAME
"hirewebagency.com"
SERVER_ADMIN
"webmaster@hirewebagency.com"
SERVER_PORT
"80"
REQUEST_SCHEME
"http"
REQUEST_URI
"/shoutboard/"
SCRIPT_FILENAME
"/home/hireweba/public_html/shoutboard/index.php"
QUERY_STRING
""
SCRIPT_URI
"http://hirewebagency.com/shoutboard/"
SCRIPT_URL
"/shoutboard/"
SCRIPT_NAME
"/shoutboard/index.php"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SOFTWARE
"LiteSpeed"
REQUEST_METHOD
"GET"
X-LSCACHE
"on"
PHP_SELF
"/shoutboard/index.php"
REQUEST_TIME_FLOAT
1593728340.4207
REQUEST_TIME
1593728340
APP_ENV
"production"
APP_LOCALE
"en"
APP_DEBUG
"true"
APP_KEY
"base64:w9teGk41JDU/SYFs/2PhjGSRABsa75get7CPlzLfjOk="
APP_URL
"http://hirewebagency.com/shoutboard"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"hireweba_shoutboard"
DB_USERNAME
"hireweba_shoutb"
DB_PASSWORD
"qfZ7nF@652XJ"
BASE_URL
"http://hirewebagency.com/shoutboard"
CDN_URL
"http://cdn.strimoid.dev"
CACHE_DRIVER
"array"
EMAIL_DRIVER
"log"
MAIL_HOST
""
MAIL_PORT
""
MAIL_ENCRYPTION
""
MAIL_USERNAME
""
MAIL_PASSWORD
""
PUSHER_KEY
""
PUSHER_SECRET
""
PUSHER_ID
""
NOCAPTCHA_SECRET
""
NOCAPTCHA_SITEKEY
""
Key Value
PATH
"/usr/local/bin:/bin:/usr/bin"
APP_ENV
"production"
APP_LOCALE
"en"
APP_DEBUG
"true"
APP_KEY
"base64:w9teGk41JDU/SYFs/2PhjGSRABsa75get7CPlzLfjOk="
APP_URL
"http://hirewebagency.com/shoutboard"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"hireweba_shoutboard"
DB_USERNAME
"hireweba_shoutb"
DB_PASSWORD
"qfZ7nF@652XJ"
BASE_URL
"http://hirewebagency.com/shoutboard"
CDN_URL
"http://cdn.strimoid.dev"
CACHE_DRIVER
"array"
EMAIL_DRIVER
"log"
MAIL_HOST
""
MAIL_PORT
""
MAIL_ENCRYPTION
""
MAIL_USERNAME
""
MAIL_PASSWORD
""
PUSHER_KEY
""
PUSHER_SECRET
""
PUSHER_ID
""
NOCAPTCHA_SECRET
""
NOCAPTCHA_SITEKEY
""
0. Whoops\Handler\PrettyPageHandler