Connect to SQL and using AREL XML libraries.. or not (don't mind)...

88 views
Skip to first unread message

karol

unread,
Oct 8, 2012, 10:15:14 AM10/8/12
to junaio-d...@googlegroups.com
Hi,

I'm desperate, is there any way to connect to database, retrieve own data from it and create POIs accordingly, using the AREL libraries?

I have achieved to connect to db and see the POIs and also use AREL (LBS_A4) to create 3D models but cannot I combine those? I have been trying to move libraries, copy and pasting... but not luck. If I change things too much, appears the 500 Error in server, so I don't know where is the error and I have to try something else...
I have tried to move AREL libraries and functions, etc to the working copy of SQL and the other way around but I always get stucked in test 2: 
An authorized request to the pois/search interface was sent. This interface is mandatory and needs to be implemented at every external channel. Possible warning or error causes can be missing scripts or dependencies as well as an invalid API key.

Request:
http://54.247.2.103/junaio_LBS_3_SQL/html/index.php/pois/search/?&uid=cd62aa53358bb927d794e6bd92135f98&l=37.77522,-122.420082,0&p=5000&m=40&device=iphone

Expected return:
HTTP Code 200 - OK.

Return:
Return Status: 500 - Internal Server Error

A pois search interface does not seem to be available.


This is my last most reasonable try: http://54.247.2.103/junaioSQL_3D/

and here what I have done (in search.php) using the junaiopoibuilder.class (select($query) thing):




I also have defined the database, hostname..etc (and it's working if I do the SQL tutorial)

If anybody can help, it would be great!

Karol


Frank_junaio

unread,
Oct 8, 2012, 10:45:37 AM10/8/12
to junaio-d...@googlegroups.com
hey Karol,

please have a look at the trouble shooting of tutorial 1 (GLUE or Location Based).
There is information provided what to do for an error to get more information.

Bottom of e.g.:
http://www.junaio.com/develop/quickstart/hello-glue/

there it says:

Failure of Validation Test 1 - Check Callback URL

Error Code 404

  • Double check whether the underscore of _.htaccess has been removed, leaving .htaccess on your server.
  • Make sure your URL really is available by typing in the URL in your browser. If your browser shows a page not found or similar, please correct your Callback URL. A blank page is usually a good sign.
  • Perhaps your server does not support mod_rewrite. Please add at the end of your Callback URL "?path=". For more information, look at the Readme.pdf in your Getting Started Package.

Error Code 500

There is most likely a php error in your script. It is best to check your script locally first using a local server setup (e.g. xampp - a package with apache, mysql and some more).

Either on your server or locally, to make sure to see the php errors and warning, do the following temporary adjustments to your script:

  1. If available, set the DEBUG Variable to true in the config.php, if not, please add the following lines to your index.php. This will show all warning and errors coming from php and makes sure they are not supressed by your server (if possible on your server)
error_reporting(E_ALL);
ini_set('display_errors', '1');
  1. You can then validate your channel again and in Test 2 click "Show Request Response" to look for php errors or warnings. You can also copy and paste the request URL of Test 1 in your browser. Just make sure you have commented out the authentication in your index.php for the debugging process, so your channel does not return an unauthorized response.

Failure of Validation Test 2 - Check pois/search

For certain servers, this test will output an unauthorized error.

  • Make sure you have edited the config.php and added your correct API key. Your API key can be found here.
  • Certain servers will not forward the authorization header. If your server supports mod_rewrite, please add the folowing line to your .htaccess in the channel's html folder on your server.




RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  • Make sure that your server time is correct. Requests to your server that are older than 15 minutes will be refused with unauthorized. You can extent that time period in your config.php.
  • Try to comment out the authorization on your server (line 13 - 16 of your index.php) and the require_once junaio.class.php statement (line 9 of your index.php). If the error still occurs, there is a server reason why HTTP Status Code 401 - Unauthorized is send. Please ask your administrator for more information.
  • If you pass this test now, please make sure, the AUTHORIZATION header (or HTTP_AUTHORIZATION or REDIRECT_HTTP_AUTHORIZATION) is allowed. Please ask your administrator for more information.

Note: It is not recommended to comment out the authorization for active channels, because there will be no authentication, that only junaio can access the channel information on your server.

Failure of Validation Test 3

Please read the error message of this step. Most common errors are:

  • There is an error in your XML. Please make sure you have followed the Tutorial closely.
  • There are additional characters at the end or the beginning of your XML output. Please make sure there are no additional characters there (also no spaces, newlines or similar).
  • Make sure the information provided within your output is UTF-8 encoded.

karol

unread,
Oct 8, 2012, 12:59:47 PM10/8/12
to junaio-d...@googlegroups.com
Hei thanks for that fast answer, sure I will do!
Reply all
Reply to author
Forward
0 new messages