Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jtvdw's avatar
Level 1

Symfony\Component\HttpKernel\Exception\HttpException

Hi,

I'm getting this error on my website : Symfony\Component\HttpKernel\Exception\HttpException & here is a link to the website : https://buynow.liqstage.co.za

Any help or input would be mush appreciated.

Thanks.

0 likes
12 replies
tykus's avatar

You are catching a generic Exception in the FrontendCategoriesViewComposer and aborting with a 500 status code whenever you are trying to assign to $brandsCategoriesProductsRetailers

try {

	$brandsCategoriesProductsRetailersModel = new BrandCategoryProductRetailerView();

	$brandsCategoriesProductsRetailers = $brandsCategoriesProductsRetailersModel->getAllActiveByCountry();

} catch (Exception $e) {

	Log::channel('buynow')->error($e);

	abort(500);
}

Check your logs for the detail of the exception. Maybe try to handle this more gracefully, there is little benefit to a hard abort here

jtvdw's avatar
Level 1

Here is some log file output :

#52 /web/sites/buynow.liqstage.co.za/src/vendor/fruitcake/laravel-cors/src/HandleCors.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #53 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure)) #54 /web/sites/buynow.liqstage.co.za/src/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #55 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure)) #56 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #57 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #58 /web/sites/buynow.liqstage.co.za/src/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(109): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #59 /web/sites/buynow.liqstage.co.za/src/public/index.php(57): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #60 {main} "}

jtvdw's avatar
Level 1

Thought so, will revert back once I have more feedback.

tykus's avatar

Just rethrow the exception.

// ...
} catch (Exception $e) {
	Log::channel('buynow')->error($e);
	throw($e);
}
jlrdw's avatar

Did you recently upgrade. If so what ver to what ver.

jtvdw's avatar
Level 1

@jlrdw no update done recently. Current version is "Laravel Framework 7.28.3"

tykus's avatar

Yes, but a better exception message

General error: 1615 Prepared statement needs to be re-prepared (SQL: select * from `brands_categories_products_retailers_view` where (`brand_is_active` = 1 and `product_is_active` = 1 and `retailer_is_active` = 1 and `retailer_country_id` = 161) order by `brand_order` asc, `brand_name` asc, `product_name` asc)

The solution to the problem however is not so easy, you are on a shared hosting r do you actually have prepared statements yourself?

Please or to participate in this conversation.