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