-
Couldn't load subscription status.
- Fork 11.6k
Closed
Labels
Description
Laravel Version
12.29+
PHP Version
8.3.6
Database Driver & Version
MySQL 8.0.30
Description
Starting with Laravel 12.29, throwing exceptions causes Apache to crash with ERR_CONNECTION_RESET instead of displaying the Laravel error page when OPcache is enabled. This only happens with unhandled exceptions - abort(500) works correctly.
Additional Context
- Works correctly: Laravel 12.28 and earlier
- Breaks: Laravel 12.29+ (coincides with new local debug page)
- Affected PHP versions: 8.2.x and 8.3.6 (both crash)
- Workaround: Disable OPcache or use
php_flag opcache.enable Offin.htaccess - Only affects: Unhandled exceptions (
throw new Exception()) - Works fine: Laravel's
abort()function
Environment Details
- Windows 11
- PHP 8.2.x & 8.3.6 with minimal OPcache config (default settings, only
zend_extension=opcacheuncommented) - Apache 2.4.59 (via Laragon)
- Fresh Laravel installation (reproduced on clean project)
- Cannot test on other OS currently
Steps To Reproduce
- Install fresh Laravel 12.29+ project
- Enable OPcache in PHP (minimal config: just
zend_extension=opcache) - Create route:
Route::get('/test', fn() => throw new \RuntimeException('Test')); - Visit
/testin browser - Apache crashes and browser shows message
ERR_CONNECTION_RESET
glensc and nickturrietta