V4: The internal php server for laravel crashes on load without errors when loading any page
Package
filament/filament
Package Version
v4.0.0-beta5
Laravel Version
v11.45.1
Livewire Version
v3.6.3
PHP Version
v8.2.4
Problem description
When i use the command php artisan serve, with or without any extra params (like port or host), the server exists on load.
When trying to load the default laravel welcome page it works, when switching to the dashpoard panel path it redirects to login and crashes. No logs, no errors. I know this is impossible to debug, but i still reported the issue because other people may encounter this.
Important note: im using windows. I use powershell and cmd to run laravel.
Expected behavior
The login page should load so i can input my credientials
Steps to reproduce
- Using windows Powershell or CMD: Run php artisan serve
- Visit 127.0.0.1:8000 in the browser
- The "server" will crash, and the page responds with connection refused
Reproduction repository (issue will be closed if this is not valid)
https://github.com/demianottema/NKC-Dashboard
Relevant log output
Tested the repo with php-8.2.4-x64NTS.zip I was unable to duplicate this on Windows Powershell using artisan serve. Name Value
PSVersion 5.1.26100.3624 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.26100.3624 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Can you help me reproduce this?
i have the same issue.
i have the same issue.
Can you help reproduce it? What version of PHP are you using? 8.2.4 NTS? I installed the test repo on my windows box and so far can't get it to break.
i have the same issue.
Can you help reproduce it? What version of PHP are you using? 8.2.4 NTS? I installed the test repo on my windows box and so far can't get it to break.
my php version is 8.24. i run the artisan command on the git bash.
actually i tried to upgrade filament v3 to v4. that show me error. so i uninstalled the filament and installed new filament with
composer config minimum-stability beta
composer require filament/filament:"^4.0"
php artisan filament:install --panels
i copied my old filament resources files to other directory and delete the app/filament from my project. so that old file cannot give me the errors because of the version comparability.
after that i ran the php artisan serve and i try to visit my http://localhost:8000/ and its working fine.
but when i hit the http://localhost:8000/admin/ its show me This site can’t be reached
then i try to access again to my home page "http://localhost:8000/" its not working anymore.
i cleaned my laravel.log files and checked it! there is no error at all. then i stopped the artisan serve and ran the serve again. still same.
composer.json
"require": {
"php": "^8.2",
"filament/filament": "^4.0",
"flowframe/laravel-trend": "*",
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1",
"livewire/flux": "^2.1.1",
"livewire/volt": "^1.7.0",
"spatie/laravel-activitylog": "^4.10",
"spatie/laravel-permission": "^6.17"
},
"minimum-stability": "beta",
how i can solve this issue? please guide me!
This is the output for php -v: PHP 8.2.4 (cli) (built: Mar 14 2023 17:54:25) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.2.4, Copyright (c) Zend Technologies
Powershell info: Name Value PSVersion 5.1.26100.4202 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.26100.4202 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
There are no logs at all, do you have any idea where i could find a stack trace or how i could get a log from the artisan serve?
I am investigating further, and see the page stops working because the artisan serve command proceeds to a new port. When i start with 127.0.0.1:8000 then it "crashes" (with exitcode:-1073741819) and it moves on to 127.0.0.1:8001. When i visist 127.0.0.1:8001:app/login it again crashes and the saga continous. The first time i ran it, i specified the port, and therefore the port was not changed but the server just "crashed"
It tells me not why it crashes, but we do have a exit code, where i can't find anything for.
The exit code –1073741819 corresponds to 0xC0000005 in hexadecimal, which indicates an unhandled Access Violation (memory access error) in Windows.
https://peteronprogramming.wordpress.com/2018/05/29/list-of-peculiar-exit-codes-on-windows/
@sbrimon10 Can you confirm if you are using php from xampp? I am using xammp and it could be possible that could pe part of the problem
@alex-elivate I have installed the 8.3.22 version for php and discovered that it would run if i use that. No i can safely conclude that there is a issue within the xampp version of php.
@sbrimon10 Can you confirm if you are using php from xampp? I am using xammp and it could be possible that could pe part of the problem
i am using XAMPP Version: 8.2.4. right now i created a new laravel project and installed the filament v4 and it showed me the login page. after that i installed composer require spatie/laravel-permission and again start crashing. and then i remove the spatie package but it not working anymore!
so how i can debug? should i upgrade my PHP 8.2.4 to up?
Worked! i updated my php version 8.2.4 to 8.2.12. and then i installed the filament v4 beta. and showed me the login page without crashing. and i logged in successfully.
Current PHP 8.2.12
Filament 4.0 beta 5
thanks for your replied and your support.
Nicely done @sbrimon10 and @demianottema . I would not have thought of installing XAMPP to reproduce this. I wonder if this is worth pursuing more or just documenting the issue in PHP/XAMP v.8.2.4 is the correct path?
Thanks you, I found a download, and tested. I was able to reproduce this.
Native PHP 8.2.4 (NTS) works XAMPP PHP 8.2.4 (ZTS) broken
I tested the native binary ZTS and it works. It's for sure something in the XAMPP build. PHP 8.2.4 (cli) (built: Mar 14 2023 17:54:25) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.2.4, Copyright (c) Zend Technologies
Looks like an infinite recursion issue. Php runs out of memory and crashes the server. Its seems to be triggered by: PHP Livewire\Exceptions\PropertyNotFoundException: Property [$form] not found on component: [filament.auth.pages.login] in D:\Projects\NKC-Dashboard\vendor\livewire\livewire\src\Component.php on line 105
for sure an issue in the php build. I assume method resolution is somehow broken in this build.
Thanks for the investigation folks! Seems like you have narrowed the issue down to the PHP version then.
Same issue here for 8.2.3 with no XAMPP just running PHP standalone on my Windows box in case anyone else finds this from Google. Upgrade of PHP to 8.4 fixed the issue.