Deployment Error
I have been trying for the last 2 hours to deploy my laravel/filament project on my server. I kept getting error 500 (server not laravel). After making some research with a friend we found out that the error is coming from the server itself not the laravel/filament project. so when i check the server logs i got this "2023-12-16 14:34:16.810265 [NOTICE] [2014] [T0] [xxx.xxx.xxx.xxx:62299-H3:D9BDE24FE5D394C2-4#APVH_efacture.algeriainnov.tech:443] [STDERR] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in /home/algeriainnov/efacture.algeriainnov.tech/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php on line 102\n" Does that mean there's an infinite loop somewhere in the code ?
46 Replies
Also here's my composer.json
a lot is happening in a deployment
what if you deploy without filament
what is your deployment script
dose your server have all the minimal requirement for laravel and filament
storage folders permission?!
1- I already have project deployed without Filament in the server.
2- I git pull from github and set up the .env
3- I'm not really sure but it's the first time i get this error
4- stroage permission 0755
@Lara Zeus Thank you for your quick response
not sure if related but only keep filament/filament and remove the other, update locally and push to test
when the error shown? during composer install or visiting a page
Have also tried this but same error 500.
have tried to push the project to a whole different server and it's giving the same error.
Have also tried to push a brand new laraevl project and it's working normally.
?
something issue about vendor folder.. i think you fix issue if remove vendor folder and run again composer install
when the page loads UP. sorry i missed responding to your message
will try doing this right now
yeah, when I first deployed I got a 500 error, after implementing FilamentUser in the class and adding this function
it worked, just changed @yourdoman.com, with your actual domain name, mine was something like @ testing.co.uk
the email that you login with must end with the custom
@Archie i think that 500 error coming before filament login page... AuthManager.php on line 102 in line 102 laravel not found any auth driver.. and authmanager try to solve it again and crash fatal error
another option for this error is that all the config files of laravel are missing
i have just tried this but unfortunately i keep getting the same error. :/ i think the error really comes from somwhere else.
have you tried as Jouni suggested with the vedor file? Probably make a zip file of it and unzip to see if there's some files missing
Also, when i check the laravel log file i dont find any error, the issue probably is the server is stopping the laravel application because of the infinite loop, so laravel doesnt even get the change to log the error. instead the error i can find it in cpanel error logs.
i have deleted the vendor and did composer install all over again and i still have the same issue. but what do you mean by zipping and unzipping ?
@Ali how about config files.. you are same files in deployment server vs developer ?
laravel crash before any provider.. then you not got any error in laravel logs..
i have the same project, i have pushed the code to github and pulled it on the server
but your git include also all config files..
nvm, if composer install ran successfully it's not going to help
I will try to make a new filament project right now and push it to the server and see what's going on.
maybe if you can share the repo and I try helping from here
yes let me make it public
check this git ls-files --others --exclude-standard
Here it is. https://github.com/Da-ci/online-invoice-payment thank you guys really for helping me out
GitHub
GitHub - Da-ci/online-invoice-payment: A quick solution for invoice...
A quick solution for invoice payments initially made for heetch @ Guiddini - GitHub - Da-ci/online-invoice-payment: A quick solution for invoice payments initially made for heetch @ Guiddini
as soon as I looked at the repo, it seems to be fine.. what php version you use
-1 locally 8.1.13
-2 server 8.1.26
and php artisan route:list that working ?
here it is my friend
and composer dump autoload not result error ?
yup worked perfectly im losing my mind over this
you use local valet or something else ?
I've got the same error when I tried to run it locally, so I set up the .env and ran this
, in addition I also got a view not found(search.search) error and change the name folder from Search to search
cpanel uses case sensitive by default then uppercase folder name result error.. the same also applies to the class name
and namespace
my local server that working fine..
- Downloading phpunit/phpunit (10.5.3)
- Downloading spatie/laravel-ignition (2.3.2)
- Upgrading symfony/css-selector (v6.4.0 => v7.0.0): Extracting archive
- Upgrading symfony/event-dispatcher (v6.4.0 => v7.0.0): Extracting archive
- Upgrading symfony/string (v6.4.0 => v7.0.0): Extracting archive
- Upgrading carbonphp/carbon-doctrine-types (2.0.0 => 2.1.0): Extracting archive
- Upgrading laravel/framework (v10.35.0 => v10.37.3): Extracting archive
- Upgrading livewire/livewire (v3.2.6 => v3.3.0): Extracting archive
- Upgrading symfony/yaml (v6.4.0 => v7.0.0): Extracting archive
- Upgrading nikic/php-parser (v4.17.1 => v4.18.0): Extracting archive
- Upgrading phpunit/php-code-coverage (10.1.9 => 10.1.10): Extracting archive
- Upgrading phpunit/phpunit (10.5.2 => 10.5.3): Extracting archive
- Upgrading spatie/laravel-ignition (2.3.1 => 2.3.2): Extracting archive
upgraded lasted laravel and livewire
the only difference is that I use php 8.2 and 8.3
yup well I couldnt reporduce the error locally.
and for that error, i forgot the rename the file from Search to search. but what could be the problem ? im really getting lost over here. it's my first time working with filament anyway
issue not filament and laravel... issue is your server settings..
that work also my product server fine
if you can try to change php version 8.2
the problem is not filament, I've deployed it and it's working
So what do you think the problem is ?
Do you think the problem comes with the laravel version ?
Or just my server configuration?
This will be the first thing i will do once i get home i will keep you updated
have you set-up the database correctly in the .env? and tried running the commands above
if you should end up with something like this, if you aren't sure what your setting in the .env it's
and
, good luck! 😃
Hello @Archie and hello @Jouni have tried to start the hosting process from the beginning and no hope, the application still gives the error 500. to assure you that the .env is set up correctly. i tried to do php artisan migrate and it worked correctly.
And as of this time i still get these errors in my server.
for more information. sometimes when i load the page this error actually shows up. and most of the refreshes it just gives me error 500
and i get this error jsut when i get the error 500
I think you should remove/rename your
.env
file from your project root. Few server doesn't allow this.I still believe that the problem is in the server's php, it's hard to give exact advice when you don't know if php-fpm is in use. What settings and what are the memory settings of php at the moment.. usually the insufficient memory problem is caused by the php settings itself or by the non-functionality of its handler
or in fact I know that the problem is in the php settings because the github version of the application works for me as well as the local and deployment server
I feel it is purely a server configuration issue. Are you on a shared or managed VPS host with limited control? It feels like it is a PHP versioning issue. Many times host providers especially shared hosts allow you to change the php version for domains and sub-domains using their Cpanel which changes the php version but your dependent packages and other settings still default to their base default php version. Do also check your database configuration. Like DB HOST.