Page 1 of 1

Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 12:49 pm
by TBT
Using Google Map v1.5, Get Geocode For An Address returns error "Geocode was not successful for the following reason: REQUEST_DENIED".

Please advise.

Re: Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 1:09 pm
by lmiltchev
Are you seeing this error when entering any address or a specific one? Do you see this error in all browsers (IE, FF, Chrome, etc.)? Are you using a SSL or a proxy?

Do you see any errors in the apache error log?

Code: Select all

tail -100 /var/log/httpd/error_log

Re: Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 2:12 pm
by lmiltchev
One more thing - do you need to use an API key for commercial use? If you do, try adding the URL in the "/usr/local/nagiosxi/html/includes/components/googlemap/map.php", replacing the text in red:
<!--Replace below line with google's premier client ID script for appropriate commercial use-->
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">
Let us know if this fixed your issue. Thank you!

Re: Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 2:17 pm
by TBT
lmiltchev wrote:Are you seeing this error when entering any address or a specific one? Do you see this error in all browsers (IE, FF, Chrome, etc.)? Are you using a SSL or a proxy?

Do you see any errors in the apache error log?

Code: Select all

tail -100 /var/log/httpd/error_log
With further testing "Minneapolis, MN" or "Duluth, MN" work, but Canadian locations "Thunder Bay, ON" or "Toronto, ON" do not. Tested in current version of FF and Chrome. Using SSL.

Errors on page load/auto refresh:
[Thu Nov 10 14:01:31 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 158, referer: https://monitor-dev.domain.com/nagiosxi/

Re: Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 2:37 pm
by bheden
Go here: https://developers.google.com/maps/docu ... et-api-key to obtain an API Key for your googlemaps component.

It should direct you to https://developers.google.com/maps/docu ... pi-key#key (If you're going to use the standard plan).

Then click 'GET A KEY'.

Follow the directions, and then change this line of map.php in the googlemap component directory:

Code: Select all

<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
With this:

Code: Select all

<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=[YOURAPIKEY]"></script>
I suspect this will clear up the issues you're having.

Re: Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 2:54 pm
by TBT
Thank you, this has corrected the issue.

Re: Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 2:57 pm
by TBT
The on load error still exists in the logs though.
[Thu Nov 10 14:56:54 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 105, referer: https://monitor-dev.domain.com/nagiosxi/
[Thu Nov 10 14:56:54 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 157, referer: https://monitor-dev.domain.com/nagiosxi/
[Thu Nov 10 14:56:54 2016] [error] [client 10.2.26.252] PHP Warning: Cannot modify header information - headers already sent by (output started at /usr/local/nagiosxi/html/includes/pageparts.inc.php:263) in /usr/local/nagiosxi/html/includes/utils.inc.php on line 158, referer: https://monitor-dev.domain.com/nagiosxi/

Re: Google Map v1.5 Bug

Posted: Thu Nov 10, 2016 3:14 pm
by bheden
I'll look into this and get it fixed for the next version. Also, I'll make sure there is some easy to use mechanism for applying the API Key from google.

Thanks!