abenzer/represent-map

After activating the genome project on my website I am getting this error when I try to go to my website or run the startupgenome_get.php

Opened this issue · 10 comments

Warning: Invalid argument supplied for foreach() in html/representatl/startupgenome_get.php on line 42
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

Unable to reproduce on my end. Is your places table empty, or do you already have some rows in there?

I am getting this same error which you can see if you go to my site
http://startuplongisland.com/themap/

Also my places table is empty because I want to pull from the Startup Genome site . I have my API key in the db file

We had to rewrite the geocode.php file for the new map. I will upload it.

ahh ok thank u

Any update on a fix for the startupgenome_get.php file?

Not having API access its hard for me to debug but are you sure that the $sg_location variable is setup in your db.php file? It seems this error is happening due to the fact that we are getting bad results from the API call.

Hello

Well I double checked and do have the correct API key I copy and pasted it from my profile page in the startup genome siteHere is a copy of my db.php file (see attached) and your welcome to test it out on your server using the api key in my db file
I would really love to get this map working for my local not for profit tax exempt organizations website. So any help you could give is much appreciated

This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies. You are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform me of the erroneous delivery by return e-mail. Thank You

Date: Mon, 22 Apr 2013 15:24:30 -0700
From: notifications@github.com
To: represent-map@noreply.github.com
CC: jay_reis@msn.com
Subject: Re: [represent-map] After activating the genome project on my website I am getting this error when I try to go to my website or run the startupgenome_get.php (#23)

Not having API access its hard for me to debug but are you sure that the $sg_location variable is setup in your db.php file? It seems this error is happening due to the fact that we are getting bad results from the API call.


Reply to this email directly or view it on GitHub.

Ok I've refactored the startupgenome_get.php file to use CURL instead of the HTTP class it is currently using. It seems that this class was not persisting the headers on the API call. This caused the response to return an "Authorization Required" index thus causing the loop to fail. I did not spent to much time trying to figure out why... instead I just wrote it using the trusty CURL toolset and it seems to be running well.

I haven't created a pull request to main project yet, not sure we will want to include it but it is available in my fork:

nickgs@3c9a682

Thanks.

thanks Nick

 Flehx, Inc. - Owner / Software Architect  
 Phone:   1 (866) -  616-4986
    Cell:    1 (631) - 569-0360
 Email:    jay_reis@msn.com  Twitter: @jayreis
 Website: Flehx.com 
                JasonReis.net

This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies. You are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform me of the erroneous delivery by return e-mail. Thank You






Date: Fri, 26 Apr 2013 13:32:26 -0700
From: notifications@github.com
To: represent-map@noreply.github.com
CC: jay_reis@msn.com
Subject: Re: [represent-map] After activating the genome project on my website I am getting this error when I try to go to my website or run the startupgenome_get.php (#23)

Ok I've refactored the startupgenome_get.php file to use CURL instead of the HTTP class it is currently using. It seems that this class was not persisting the headers on the API call. This caused the response to return an "Authorization Required" index thus causing the loop to fail. I did not spent to much time trying to figure out why... instead I just wrote it using the trusty CURL toolset and it seems to be running well. 

I haven't created a pull request to main project yet, not sure we will want to include it but it is available in my fork:

nickgs@3c9a682

Thanks.  

—
Reply to this email directly or view it on GitHub.