well, I tried different variations but this one worked:
$dir = BASE_UPLOAD_DIR;
$dirs = glob($dir . '/*', GLOB_ONLYDIR);
When I passed the BASE_UPLOAD_DIR directly, like this, nothing was returned:
$dirs = glob(BASE_UPLOAD_DIR. '/*', GLOB_ONLYDIR);
I don't know why that happened but there's no one to ask, so I'll live with it.
And when I changed the BASE_UPLOAD_DIR with its default path, it worked without problems.
Thanks for your input