Sorry!, solved!
I have a code to diferentiate between 'productión' and 'developing' environment.
Don't know exactly why The DB credentials didn't get the correct values.