meipiConfig.php

8 views
Skip to first unread message

e...@randomseed.org

unread,
Aug 16, 2010, 5:29:29 PM8/16/10
to Meipi OpenSource
hello,

my name is erich berger and i am new to this group. i was over the
last year in contact with guillermo alvaro rey when i was doing a
sketch of the climatescope meipi.
after installing a meipi successfully on my localhost i am now
starting to develop a meipi hosted on our server and encountered a
problem with meipiConfig.php but i have no idea whats wrong.

on http://climatescope.net/meipi/meipi.php i get a "This web site
needs a different Google Maps API key. A new key can be generated at
http://code.google.com/apis/maps/."

but when i use the same key with a test script it works fine.

here the regarding lines of meipiConfig.php:

<?

// DB
require_once("dbConfig.php");

// Main Url: The address where this meipi is hosted
$mainUrl = "http://climatescope.net/";

// Links
$meipiUrl = "http://www.meipi.org/";
$blogUrl = "http://blog.meipi.org/";
$aboutUrl = "http://www.meipi.org/about.php";
$licenseUrl = "http://creativecommons.org/licenses/by-sa/2.5/
es/";
$faqUrl = "http://www.meipi.org/faq.php";
$legalUrl = "http://www.meipi.org/legal.php";

// Base Folder: The local path to the code
$baseFolder = "/home/climatescope/public_html/meipi/"; // TODO

// Configuration for Google Maps // TODO
$google_maps_keys = array(
"climatescope.net/meipi" => "GOOGLE_MAPS_API_KEY_1",
// Default

"ABQIAAAAWRdQzpvkvJrYx4EEFP3oQBTJrCsORgTJcqsJCbvcXuXfl1egMxRjdzEYtkcRoqF02pST6TrF9jeSIQ"
=> "GOOGLE_MAPS_API_KEY_1"
);
function getGoogleMapsKey()
{
global $google_maps_keys;
foreach($google_maps_keys as $address =>
$googleMapsKey)
{
if($address==="" ||
strpos($_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"], $address)!
==FALSE)
{
return $googleMapsKey;
}
}
}
$google_maps_key = getGoogleMapsKey();
.
.
.
.

and here the test script where the same key works fine:
http://climatescope.net/meipi/google_test.html

i would appreciate your help very much.

best

erich

Guillermo Álvaro Rey

unread,
Aug 17, 2010, 4:07:41 AM8/17/10
to me...@googlegroups.com
Hi Erich!

I think the problem is that you need to substitute the GOOGLE_MAPS_API_KEY_1 with the key, as in:

=> "ABQIAAAAWRdQzpvkvJrYx4EEFP3oQBTJrCsORgTJcqsJCbvcXuXfl1egMxRjdzEYtkcRoqF02pST6TrF9jeSIQ"

It seems we have to explain it better, as this has happened before to other users. :-) So thanks for pointing that out!

Cheers,
 - -g

erich

unread,
Aug 18, 2010, 2:43:15 PM8/18/10
to me...@googlegroups.com
dear guillermo,

thank you very much, this solved the problem!

one other problem when uploading an image:
when one wants to upload an image the BROWSE button is only active for
clicking if one stays with the mouse-pointer on the left and lower one
pixel wide frame.

best

erich

erich

unread,
Aug 19, 2010, 3:53:29 PM8/19/10
to me...@googlegroups.com
hello,

i have the meipi now up and running.
(i only had some minor disturbance with "convert"
beeing in /usr/local/bin but a symlink to /usr/bin/
solved that).

i can confirm now that meipi works also
on freebsd (though not surprising)
as my server runs freebsd
and not a linux flavour.

best

erich


Guillermo Álvaro Rey

unread,
Aug 23, 2010, 11:25:34 AM8/23/10
to me...@googlegroups.com
Hi Erich,

Thanks very much for confirming that meipi works on freeBSD. :-)

We'll contact you privately soon about the committer credentials.

Cheers!
 - -g

Jorge Alvaro

unread,
Aug 23, 2010, 12:47:49 PM8/23/10
to me...@googlegroups.com
Hi Erich,

Can you open the issue in the meipi project issues page? That's a good way to track the problems still pending.

Guillermo told me he remember seeing the problem you are describing, but I can't remember it. I don't currently have a meipi installation on this computer, I'll try to reproduce it (and fix it if I see how) when possible.

It can be used for bugs and new feature requests. Maybe someone sees some request and decides to code it.

Thanks,
Jorge

Reply all
Reply to author
Forward
0 new messages