represent-map icon indicating copy to clipboard operation
represent-map copied to clipboard

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

Open justincron opened this issue 12 years ago • 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

justincron avatar Feb 03 '13 17:02 justincron

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

abenzer avatar Apr 16 '13 06:04 abenzer

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

jayreis avatar Apr 19 '13 21:04 jayreis

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

jayreis avatar Apr 19 '13 21:04 jayreis

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

absolutdahl avatar Apr 19 '13 21:04 absolutdahl

ahh ok thank u

jayreis avatar Apr 19 '13 21:04 jayreis

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

jayreis avatar Apr 21 '13 02:04 jayreis

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.

nickgs avatar Apr 22 '13 22:04 nickgs

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: [email protected] To: [email protected] CC: [email protected] 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.

jayreis avatar Apr 23 '13 03:04 jayreis

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:

https://github.com/nickgs/represent-map/commit/3c9a682cc51862bc4d9dac4fffc6038547bd3646

Thanks.

nickgs avatar Apr 26 '13 20:04 nickgs

thanks Nick

 Flehx, Inc. - Owner / Software Architect  
 Phone:   1 (866) -  616-4986
    Cell:    1 (631) - 569-0360
 Email:    [email protected]  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: [email protected]
To: [email protected]
CC: [email protected]
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.                    

jayreis avatar Apr 26 '13 21:04 jayreis