Php Artisan Filament:Upgrade showing HTML 404

Hello everyone! hey guys, I'm trying to find the solution to this but I can't, why would
php artisan filament:upgrade
php artisan filament:upgrade
go straight to 404? Just a note, site was working fine for quite awhile then I just suddenly saw 404 Thank you for any insight
No description
50 Replies
awcodes
awcodes3mo ago
Is this in production or local?
tallgeese
tallgeese3mo ago
production
awcodes
awcodes3mo ago
Try a php artisan optimize:clear just in case your routes are cached. But to my knowledge nothing changed with the routing so it’s weird you’re getting a 404.
tallgeese
tallgeese3mo ago
No description
tallgeese
tallgeese3mo ago
yeah, and this was working and had about 60 MAU and I haven't checked in a week or so and I only checked because someone messaged me saying a 404 so I hadn't like you know, pulled or updated or anything
tallgeese
tallgeese3mo ago
No description
tallgeese
tallgeese3mo ago
dunno if this helps
awcodes
awcodes3mo ago
Sorry I don’t understand your screenshot, is running that command putting that html code? That doesn’t make any sense at all if that is the case.
tallgeese
tallgeese3mo ago
yes, running php artisan filament:upgrade only returns that HTML code very weird! I checked nginx, everything is configured as normal
awcodes
awcodes3mo ago
Ok something is definitely screwed up on your server. A console command should not be outputting an html string. And filament:upgrade doesn’t have anything in it that would be returning an html sting like that. Only thing I can think of is to delete the vendor folder and try a fresh composer install
tallgeese
tallgeese3mo ago
ok will try that now
tallgeese
tallgeese3mo ago
deleted vendor folder and ran composer install and it got here:
No description
tallgeese
tallgeese3mo ago
then the 404 again
awcodes
awcodes3mo ago
Can you share the scripts part of your composer.json?
tallgeese
tallgeese3mo ago
yes
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan filament:upgrade"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan filament:upgrade"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
awcodes
awcodes3mo ago
Hmm. That all looks ok.
tallgeese
tallgeese3mo ago
Yeah, it's really confusing!
awcodes
awcodes3mo ago
I have never seen this before.
tallgeese
tallgeese3mo ago
haha wow if you have never seen it, it must be rare 😄
awcodes
awcodes3mo ago
And I’m not seeing anything in the latest release that would break the upgrade command.
tallgeese
tallgeese3mo ago
I haven't worked on this in about 8 months so it's that version from then that I guess was working
awcodes
awcodes3mo ago
What version of filament does the server show. php artisan about
tallgeese
tallgeese3mo ago
THat gives the same 404 error in HTML too
awcodes
awcodes3mo ago
Hmm. So this sounds higher up than filament. When you deleted the vendor folder did you also delete the composer.lock?
tallgeese
tallgeese3mo ago
no I didn't delete the composer.lock should I try that?
awcodes
awcodes3mo ago
It’s definitely something on your server and not related to filament as best as I can tell.
wyChoong
wyChoong3mo ago
php -v ?
tallgeese
tallgeese3mo ago
No description
tallgeese
tallgeese3mo ago
It seems that way
awcodes
awcodes3mo ago
And what version of laravel is the app on? Did you upgrade to laravel 11 ?
tallgeese
tallgeese3mo ago
Laravel 10.10
wyChoong
wyChoong3mo ago
Do you have version control? git status?
tallgeese
tallgeese3mo ago
No description
wyChoong
wyChoong3mo ago
Feels like your public/index.php is tempered
tallgeese
tallgeese3mo ago
No description
wyChoong
wyChoong3mo ago
And the Wordpress wp-* files are intentionally?
tallgeese
tallgeese3mo ago
No description
tallgeese
tallgeese3mo ago
no I didn't even notice them they should not be there
wyChoong
wyChoong3mo ago
Right, you might be hacked 😬 Check your .htaccess Might be routing you to somewhere
tallgeese
tallgeese3mo ago
No description
tallgeese
tallgeese3mo ago
looks normal I think
tallgeese
tallgeese3mo ago
No description
awcodes
awcodes3mo ago
I hate to say it, but just feels like something on your server has been compromised. Like I said I have never in my years of working with laravel or php seen composer output html code in the terminal.
tallgeese
tallgeese3mo ago
yeah neither have I. I'm looking up this php error now and it is "Primary Script Unknown" Trying to resolve that then perhaps things will fall into place thanks so much for trying to help, I"ll see what I can do
awcodes
awcodes3mo ago
Keep me informed. I am generally curious about it.
tallgeese
tallgeese3mo ago
Will do 🙂
awcodes
awcodes3mo ago
Would happily debug more if I could, but no way without being able to stack trace and debug myself.
tallgeese
tallgeese3mo ago
Thanks a lot. I really love filament so hoping I can fix this up and get back to smooth sailing 🙂
awcodes
awcodes3mo ago
Yea. Wish I had more insight and could give you more answers, but it just doesn’t sound like a filament issue.
tallgeese
tallgeese3mo ago
From my investigations now, it def seems like it isn't