Check for non-standard DOCUMENT_ROOT var

DOCUMENT_ROOT_HASH seems to be a specific var used by tuxfamily and
doesn't scale well to other Apache/PHP systems.   Now falls back on the
more widely used DOCUMENT_ROOT if not found.
Suppress "missing arguments" warning

When menu_item is called with only a single parameter, php warns that
the second argument is missing.

Also fixed syntax error for "REQUEST_URI".
Echo error if json is empty.

Added a check that $obj was defined prior to processing its data.