How do I get the logo path? I have a custom logo and I have tried to get his path in this way theme_get_setting('logo_path'), but no expected result.

I am using the code in a custom block, in input PHP.
logo_path seems to only be set if you override the theme's default logo via its theme settings. To get the default logo, use theme_get_setting('logo').