If you really need more than 31 characters here's what you can do:
open php5.x.x/ext/odbc/php_odbc_includes.h in an editor like notepad++
change 32 by a greater value in
typedef struct odbc_result_value {
char name[32];
char *value;
SDWORD vallen;
SDWORD coltype;
} odbc_result_value;
and recompile php.
I did it with char name[64] cause I have column names like "0214_1_VD_Type d'exploitation Type d'opération (Niveau 1)" [I didn't choose this stupid name it comes from Eccairs project]
and rebuild php with the method given here http://www.php.net/manual/en/install.windows.building.php and http://elizabethmariesmith.com/2006/11/09/
compiling-php52-on-windows-with-net-toolchain-is-it-even-possible/
with visual C++ express edition.