Google map doesn't work online |
[eluser]Omaplie[/eluser]
Hi, I really need your help. I have a work for this friday where I included a Google map. The google map displayed all locations that I include in my database. Every thing works well in local but online, the map doesn't appear… Code: <?php I do not think it's a trouble with my code because every thing is fine on my computer. I really need your help. Hope someone can help me. Thank you very much.
[eluser]alsemany[/eluser]
I'm using the same library for my project dnscall.org and here an example http://www.dnscall.org/domain/codeigniter.com if this work well on your computer and doesn't well on the hosting server I think the problem caused by php configuration please be sure that the (fopen) function is active
[eluser]Omaplie[/eluser]
Hi, Thank you very much for your quick answer, it's really kind ! I am trying to enable the fopen function but i am not allowed to modify the php.ini. I got in touch my hosting and I am waiting for an answer (I hope they'll hurry up). Are you on a dedicated server or on a shared server ?
[eluser]alsemany[/eluser]
it's a VPS (Virtual Private Server) you could try this on the .htaccess file on your web root if mod_php is installed this will be easy Code: <Ifmodule mod_php4.c>
[eluser]Omaplie[/eluser]
Hi, Thank you very much for your help. Unfortunately, it doesn't work. I read somewhere that I need to use a proxy server. http://developer.yahoo.com/javascript/howto-proxy.html Do you think it can be the trouble ? I don't really understand everything… Thank you so much for your help.
[eluser]LuckyFella73[/eluser]
I had the same problem a few days before - it was a server configuration issue. In my experience fopen is often restricted to your own server while curl is not. Here a function I use to get geo coordinates - just change the parameters (address, output format) send to google according to your application: Code: /** If you use a library that make use of fopen you could just replace the fopen part with the curl part for my function handles the return data differently
[eluser]alsemany[/eluser]
[quote author="Omaplie" date="1339579517"]Hi, Thank you very much for your help. Unfortunately, it doesn't work. I read somewhere that I need to use a proxy server. http://developer.yahoo.com/javascript/howto-proxy.html Do you think it can be the trouble ? I don't really understand everything… Thank you so much for your help.[/quote] I don't think so you don't need to use a proxy server to run google maps API you just need to allow URL Fopen and Curl function
[eluser]Omaplie[/eluser]
Hi, I contacted my hosting and they answered me that normaly fopen is enable on most server except if the safe_mod is enable, it could have conflicts. I don't understand everything what you say me to do with the code you gave me. I use this library : https://github.com/BIOSTALL/CodeIgniter-...ves/master I tried to change fopen to curl but I don't think it's what you mean… I am sorry… Thank you very much !
[eluser]Omaplie[/eluser]
I've just checked my php configuration and it's not a trouble with the fopen because it's enable : « allow_url_fopen On » Apparantly, it's an another trouble, what do you think ?
|
Welcome Guest, Not a member yet? Register Sign In |