PIC 18F PORTA pins as input
Your inputs may be lacking pull up resistors.  Without them, the inputs float and can be at any voltage level.

Some inputs can be pulled up internally by configuring them that way.  But not on port A for this device.  (It is available on port B, though.)