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
awcodes8mo ago
Is this in production or local?
tallgeese
tallgeeseOP8mo ago
production
awcodes
awcodes8mo 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
tallgeeseOP8mo ago
No description
tallgeese
tallgeeseOP8mo 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
tallgeeseOP8mo ago
No description
tallgeese
tallgeeseOP8mo ago
dunno if this helps
awcodes
awcodes8mo 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
tallgeeseOP8mo ago
yes, running php artisan filament:upgrade only returns that HTML code very weird! I checked nginx, everything is configured as normal
awcodes
awcodes8mo 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
tallgeeseOP8mo ago
ok will try that now
tallgeese
tallgeeseOP8mo ago
deleted vendor folder and ran composer install and it got here:
No description
tallgeese
tallgeeseOP8mo ago
then the 404 again
awcodes
awcodes8mo ago
Can you share the scripts part of your composer.json?
tallgeese
tallgeeseOP8mo 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
awcodes8mo ago
Hmm. That all looks ok.
tallgeese
tallgeeseOP8mo ago
Yeah, it's really confusing!
awcodes
awcodes8mo ago
I have never seen this before.
tallgeese
tallgeeseOP8mo ago
haha wow if you have never seen it, it must be rare 😄
awcodes
awcodes8mo ago
And I’m not seeing anything in the latest release that would break the upgrade command.
tallgeese
tallgeeseOP8mo ago
I haven't worked on this in about 8 months so it's that version from then that I guess was working
awcodes
awcodes8mo ago
What version of filament does the server show. php artisan about
tallgeese
tallgeeseOP8mo ago
THat gives the same 404 error in HTML too
awcodes
awcodes8mo ago
Hmm. So this sounds higher up than filament. When you deleted the vendor folder did you also delete the composer.lock?
tallgeese
tallgeeseOP8mo ago
no I didn't delete the composer.lock should I try that?
awcodes
awcodes8mo ago
It’s definitely something on your server and not related to filament as best as I can tell.
wyChoong
wyChoong8mo ago
php -v ?
tallgeese
tallgeeseOP8mo ago
No description
tallgeese
tallgeeseOP8mo ago
It seems that way
awcodes
awcodes8mo ago
And what version of laravel is the app on? Did you upgrade to laravel 11 ?
tallgeese
tallgeeseOP8mo ago
Laravel 10.10
wyChoong
wyChoong8mo ago
Do you have version control? git status?
tallgeese
tallgeeseOP8mo ago
No description
wyChoong
wyChoong8mo ago
Feels like your public/index.php is tempered
tallgeese
tallgeeseOP8mo ago
No description
wyChoong
wyChoong8mo ago
And the Wordpress wp-* files are intentionally?
tallgeese
tallgeeseOP8mo ago
No description
tallgeese
tallgeeseOP8mo ago
no I didn't even notice them they should not be there
wyChoong
wyChoong8mo ago
Right, you might be hacked 😬 Check your .htaccess Might be routing you to somewhere
tallgeese
tallgeeseOP8mo ago
No description
tallgeese
tallgeeseOP8mo ago
looks normal I think
tallgeese
tallgeeseOP8mo ago
No description
awcodes
awcodes8mo 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
tallgeeseOP8mo 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
awcodes8mo ago
Keep me informed. I am generally curious about it.
tallgeese
tallgeeseOP8mo ago
Will do 🙂
awcodes
awcodes8mo ago
Would happily debug more if I could, but no way without being able to stack trace and debug myself.
tallgeese
tallgeeseOP8mo ago
Thanks a lot. I really love filament so hoping I can fix this up and get back to smooth sailing 🙂
awcodes
awcodes8mo ago
Yea. Wish I had more insight and could give you more answers, but it just doesn’t sound like a filament issue.
tallgeese
tallgeeseOP8mo ago
From my investigations now, it def seems like it isn't

Did you find this page helpful?