Json/Rest api problems...
Moderator: Thorsten
Json/Rest api problems...
Hi
I am trying to create a flash application that sends a http get request to retrieve information from the faq database. However, i need to be able to get back the faq information in some readable and structured way such as json, etc..
You mention in your documentation that you have a json api to do just this. However, i am unable to get this to work.
when i submit the following (example) using my own page instead of mysite.com, i get no json encoded array back. I am searching by keyword, which brings up a result in the main system, but not using this.
what am i doing wrong?
http://www.mysite.com/phpmyfaq/api.php? ... en&q=hello
thanks
I am trying to create a flash application that sends a http get request to retrieve information from the faq database. However, i need to be able to get back the faq information in some readable and structured way such as json, etc..
You mention in your documentation that you have a json api to do just this. However, i am unable to get this to work.
when i submit the following (example) using my own page instead of mysite.com, i get no json encoded array back. I am searching by keyword, which brings up a result in the main system, but not using this.
what am i doing wrong?
http://www.mysite.com/phpmyfaq/api.php? ... en&q=hello
thanks
Re: Json/Rest api problems...
Hi,
the call looks okay. You can also test it on our own FAQ:
http://faq.phpmyfaq.de/api.php?action=s ... =framework
bye
Thorsten
the call looks okay. You can also test it on our own FAQ:
http://faq.phpmyfaq.de/api.php?action=s ... =framework
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Json/Rest api problems...
Hi
Maybe I am not asking the right question, actually what i want to know is how you normally would make such a call using javascript, PHP, etc. How do I get back the question and answer on the screen. What is the easiest way to do that?
Kind Regards
Maybe I am not asking the right question, actually what i want to know is how you normally would make such a call using javascript, PHP, etc. How do I get back the question and answer on the screen. What is the easiest way to do that?
Kind Regards
Re: Json/Rest api problems...
Hi,
ah, okay... this is just a GET request over HTTP... you can do that e.g. with curl, PHP, JavaScript...
bye
Thorsten
ah, okay... this is just a GET request over HTTP... you can do that e.g. with curl, PHP, JavaScript...
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Json/Rest api problems...
if its just a get request - then this should output some information, right? but it does not:
see my page below:
http://www.carlinginsight.com/phpmyfaq/ ... en&q=works
when i do a get request to your page you provided I receive some information. With mine however, I get nothing.
thanks
see my page below:
http://www.carlinginsight.com/phpmyfaq/ ... en&q=works
when i do a get request to your page you provided I receive some information. With mine however, I get nothing.
thanks
Re: Json/Rest api problems...
Hi,
a white page is normally a PHP fatal error. Do you have access to your server logs?
bye
Thorsten
a white page is normally a PHP fatal error. Do you have access to your server logs?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Json/Rest api problems...
Hi
I currently have error reporting set to E_ALL and Display Errors On in my php.ini.
Other scripts display errors if they have them, but api.php does not.
I am not seeing any error related to this in my server event log.
Kind Regards
I currently have error reporting set to E_ALL and Display Errors On in my php.ini.
Other scripts display errors if they have them, but api.php does not.
I am not seeing any error related to this in my server event log.
Kind Regards
Re: Json/Rest api problems...
Hi,
please try to enable the debug output in inc/Init.php as well.
bye
Thorsten
please try to enable the debug output in inc/Init.php as well.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Json/Rest api problems...
Hi
I have enabled the debug in Init.php as well, and now I see debug ouput when i am in admin system and front end. However still nothing from the api.php page.
http://www.carlinginsight.com/phpmyfaq/
Kind Regards
I have enabled the debug in Init.php as well, and now I see debug ouput when i am in admin system and front end. However still nothing from the api.php page.
http://www.carlinginsight.com/phpmyfaq/
Kind Regards
Re: Json/Rest api problems...
Hi,
something is broken with your installation because even the version request returns a white page:
http://www.carlinginsight.com/phpmyfaq/ ... getVersion
For further investigations I would need access to your server.
bye
Thorsten
something is broken with your installation because even the version request returns a white page:
http://www.carlinginsight.com/phpmyfaq/ ... getVersion
For further investigations I would need access to your server.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Json/Rest api problems...
Sure, I have sent you a PM about it.
Kind Regards
Mark
Kind Regards
Mark
Re: Json/Rest api problems...
Hmm, I tried to re-install with slightly different settings, this time i selected to use mysql instead of mysqli, installed to mysql database with utf-8-bin encoding, and i'm afraid there is still a problem. There were no errors or problems mentioned by the install script during or after the installation.
I am not sure where to look for the problem. If you can, have a look to see if you find the problem - i have sent you my server details. I am sure i will not be the only person having this problem when installing on iis/windows.
Kind Regards
Mark
I am not sure where to look for the problem. If you can, have a look to see if you find the problem - i have sent you my server details. I am sure i will not be the only person having this problem when installing on iis/windows.
Kind Regards
Mark
Re: Json/Rest api problems...
Hi,
I'll try to check it this evening.
bye
Thorsten
I'll try to check it this evening.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Json/Rest api problems...
Hi,
I just found it: https://github.com/thorsten/phpMyFAQ/co ... 1d675d4585
Please use this patch and it will work.
bye
Thorsten
I just found it: https://github.com/thorsten/phpMyFAQ/co ... 1d675d4585
Please use this patch and it will work.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Json/Rest api problems...
Thanks,
this has fixed my problem, i am getting a json response back!
thank you for resolving this issue so quickly,
Kind Regards
Mark
this has fixed my problem, i am getting a json response back!
thank you for resolving this issue so quickly,
Kind Regards
Mark