Skip to content
NYC Tech Tips

NYC Tech Tips

Tech Tips From a NYC System Administrator

  • Home
  • About
  • Downloads
  • JB Network Design
  • Toggle search form

Koken – API Error. The theme is not able to make contact with your Koken installation.

Posted on June 26, 2017June 26, 2017 By ninjatechnyc

I ran Koken as a photo gallery for my personal website under a Godaddy hosting.  Worked well.  But at some point I decided I needed my own “external” server for troubleshooting purposes, to help with my day-to-day System Admin job. Something outside of our corporate network so I can see if things are accessible from the outside. So I got myself a VPS from 1and1, running Windows 2008 R2.  With that I figured I move this blog, my business webpage, as well as my personal webpage to the VPS.  I’m running the webpages on IIS.

So I recreated my personal webpage and reinstalled the Koken. The install to Koken went swimmingly. No problem connecting to the database. The admin page launches with no issues.  However, when I try to visit the page, I get the dreaded “API Error. The theme is not able to make contact with your Koken installation. Contact your host to see if they are blocking loopback connections.”

Now I’m not a coding expert so I’m not sure where to look. But I started from scratch and checked the Koken requirements.  I did notice that I did not have the iMagick module so I got that to work first by following the entry by FDIM here.  After that, the iMagick module showed up under phpinfo(). But that did not help my API Error.

After alot of trial an error, I hit upon this post within Koken’s help itself.  There, the user Pascal talks about what is going on with the backend requests and it gave me the idea to simply modify the whole ” curl_setopt($curl, CURLOPT_URL, self::$protocol . ‘://’ . $host . self::$location[‘real_root_folder’] . ‘/api.php?’ . $url);”  section in koken.php. Rather than have the function try to determine where the api.php is, I hardcoded it:

curl_setopt($curl, CURLOPT_URL, ‘http://www.domain-name.com/koken/api.php?’ . $url);

Where www.domain-name.com is replaced with your own domain name. This assumes you have Koken installed in a koken subfolder off of root and the api.php is located there. (The koken.php is located in the koken\app\site\ folder – make a copy of the file before you begin editing, just in case).

Save that modified file and bingo! That’s it!  No more API Error.

I was racking my brain for two days on this.  Hopefully it will save someone else some time and trouble.

windows Tags:API Error, IIS, Koken, Loopback, windows

Post navigation

Previous Post: Increase the Max_Input_Vars in PHP For IIS WordPress Install
Next Post: WordPress Permalinks Causing 404 Error

Search

Tags

adobe Amazon antispyware antivirus apache Apple AT&T blackberry browser China computer data breach Dell dilbert dogbert email encryption facebook faulting application FB firefox firewall flash drives freeware godaddy google Hack Identity Theft Internet Explorer iPhone linux malware Microsoft paypal phishing privacy recommended reading scam security software tech support ubuntu virus windows Wordpress

Archives

  • April 2021
  • September 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • June 2017
  • May 2017
  • December 2016
  • November 2015
  • June 2015
  • June 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • September 2011
  • July 2011
  • May 2011
  • April 2011
  • March 2011
  • January 2011
  • December 2010
  • October 2010
  • August 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • December 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • February 2009
  • December 2008
  • November 2008
  • October 2008
  • July 2008
  • June 2008
  • April 2008
  • March 2008
  • January 2008

Copyright © 2021 NYC Tech Tips

Powered by PressBook Dark WordPress theme