After transferring local to server, Twig Runtime Error: Impossible to invoke a method all() on an array
You can't call .all() twice. In myEntryQuery you have converted the result into an array, you are then trying to call .all() again, but at this point you have an array, so .all() can't be used as it's not an entry query anymore.
entries will now be an array, at this point you can loop through this array and output what you need.