Firstly, you probably don't want to specify the version in the vertex shader unless you're sure of your system.  I also don't know what happens if you don't specify anything under the main function.  Try using: "void main { gl_Position = ftransform(); }".  As to your problem, I presume the uniform location is returning -1?  You need to use the shader before you can query values from it.  I think it's glUseProgram()