Page 1 of 1

[SOLVED] Fehlermeldung - Google Maps

Posted: Tue Aug 14, 2007 10:09 am
by nichess
Hallo Forum,

ich habe mir gerade das Google-Maps-Module 0.1.4 insalliert, und bekomme beim Ausfüllen eines neuen Markers folgende Meldung:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /...bla/www.knoppe-berlin.de/modules/GoogleMaps ... .class.php on line 1220

Warning: file_get_contents(http://maps.google.com/maps?output=js&q ... button.gif) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /...bla/www.knoppe-berlin.de/modules/GoogleMaps ... .class.php on line 1220

Habe ich vielleicht vergessen, in den php-Files etwas einzustellen?

Schöne Grüße
Nichess

Re: Fehlermeldung - Google Maps

Posted: Tue Aug 14, 2007 10:24 am
by cyberman
nichess wrote: Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /...bla/www.knoppe-berlin.de/modules/GoogleMaps ... .class.php on line 1220

Warning: file_get_contents(http://maps.google.com/maps?output=js&q ... button.gif) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /...bla/www.knoppe-berlin.de/modules/GoogleMaps ... .class.php on line 1220
Hmm, sieht aus, als würde dein Server diese Art Verbindungen nicht erlauben  ::) ...

Re: Fehlermeldung - Google Maps

Posted: Tue Aug 14, 2007 11:37 am
by wuschel
Das Problem kenne ich, habe die Lösung von einer anderen CMS übernommen, dessen Namen man hier nicht nennen soll. ;D

1. Classe Snoopy downloaden und nach lib/snoopy kopieren

2. in GoogleMapAPI.class.php die Funktion FetchUrl wie folgt ändern:

Code: Select all

function fetchURL($url) {

        $ok=false;
        if (get_cfg_var('cfg_file_path') <>'')
          $ok= get_cfg_var('allow_url_fopen');
        if (!$ok)
        {
       	    include "lib/snoopy/Snoopy.class.php";
	    $snoopy = new Snoopy;
	    $snoopy->fetch($url);
	    return $snoopy->results;
         }
        else
          return file_get_contents($url);

    }
und das war es auch schon.

Re: Fehlermeldung - Google Maps

Posted: Wed Aug 15, 2007 7:37 am
by nichess
Danke für den Tipp, hab es gleich mal ausprobiert, allerdings kommt jetzt:

Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /.....bla/www.knoppe-berlin.de/modules/GoogleMaps ... .class.php on line 1235

Kann eine Google-Map auch statisch in CMSmadesimple eingebaut werden?

Vielen Dank
Nichess

Re: Fehlermeldung - Google Maps

Posted: Wed Aug 15, 2007 9:45 am
by cyberman

Re: Fehlermeldung - Google Maps

Posted: Thu Sep 13, 2007 2:23 pm
by nichess
Danke für die Antwort, ich werde wohl nach dieser Methode vorgehen:

http://forum.cmsmadesimple.org/index.php/topic,5366.0.html

Allerdings habe ich noch das Problem, dass die Google Map in IE 7 angezeigt wird, in Firefox nicht.

Beste Grüße
Nichess

Re: Fehlermeldung - Google Maps

Posted: Thu Sep 13, 2007 2:26 pm
by cyberman
nichess wrote: Allerdings habe ich noch das Problem, dass die Google Map in IE 7 angezeigt wird, in Firefox nicht.
Mit welchem Firefox arbeitest du?

Ich entwickle nur mit FF2 und kann die Google Map bestens sehen!

Re: [SOLVED] Fehlermeldung - Google Maps

Posted: Thu Sep 13, 2007 2:54 pm
by nichess
Hi ich arbeite mit FF 2.0.0.6

Denke, Du hast gerade drauf geschaut, als ich den Fehler an der map.js gefunden hatte ;D.

So funktionierte es auch mit IE7:

Code: Select all

 if (GBrowserIsCompatible()) {

usw. usv.
Unter FF2 aber nur mit:

Code: Select all

 function load() {
 if (GBrowserIsCompatible()) {

usw. usv.
... und natürlich die "}" am Ende nicht vergessen.  ;)

Re: [SOLVED] Fehlermeldung - Google Maps

Posted: Thu Sep 13, 2007 3:10 pm
by cyberman
Hatte hier mal gezeigt, wie ich es gemacht habe - funzt unter FF2 und IE7

http://forum.cmsmadesimple.org/index.ph ... l#msg74569

Re: [SOLVED] Fehlermeldung - Google Maps

Posted: Thu Sep 13, 2007 4:00 pm
by nichess
Hatte hier mal gezeigt, wie ich es gemacht habe - funzt unter FF2 und IE7

http://forum.cmsmadesimple.org/index.ph ... l#msg74569
Ja so habe ich es für mich nun auch umgesetzt, vielen Dank!

Habe allerdings die Java-Anweisungen in einer map.js ausgelagert ( // //]]>), da ich Smarty Fehlermeldungen erhalten habe.

Re: [SOLVED] Fehlermeldung - Google Maps

Posted: Thu Sep 13, 2007 8:25 pm
by cyberman
Hast du das Javascript mit den {literal} Tags maskiert?

Re: [SOLVED] Fehlermeldung - Google Maps

Posted: Thu Sep 13, 2007 9:07 pm
by nichess
Habs nochmal nachgespielt, und ja, ich habe beim kopieren ein {/literal} zuviel eingefügt und dadurch etwas Javascript außen vor gelassen  ::) ::)