my base_path is empty do I need to set this manually or is something else wrong?
You haven't printed/returned any of your examples. It should be

print base_path();

global $base_path;
print $base_path;

print $GLOBALS['base_path'];


or

return base_path();

global $base_path;
return $base_path;

return $GLOBALS['base_path'];


Depending on the context.

A line with just a variable on it is valid PHP, but it won't do anything with the variable unless you tell it to.

EDIT

It's also worth considering what exactly you're expecting base_path() or $base_path to contain. The docs say this:


  Returns the base URL path (i.e., directory) of the Drupal installation.
  
  base_path() adds a "/" to the beginning and end of the returned path if the path is not empty. At the very least, this will return "/".


Unless you have your Drupal installation in a sub-folder of the web root (e.g. http://localhost/drupal/), this function/variable will always give you the value '/'.