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

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.

Shortcut or Hotkey for “Ejecting” USB devices

How-To Geek has a nice writeup on how to create a shortcut or hotkey for the “Safely Remove Hardware” dialog. Comes in handy if you’re like me and use a flash drive alot.

Running Windows Apps in Linux

Lifehacker has a great writeup on running Windows apps inside Linux with VirtualBox.

Get the right codecs to play your media file

CodecInstaller helps determine what codecs you need to play a media file properly. If you end up using the software alot, drop the guy a couple of bucks, since the app is free.

Disable Vista Permissions Prompt

From Lifehacker, disable the “Need your permission to continue” prompt

Reclaiming System Memory (Windows)

Lifehacker has an article on how to reclaim memory by managing running processes. Not for your average user.

Unable to open shim database version registry key – v2.0.50727.00000

Problem: Event log was registering the following .NET Runtime error:

Unable to open shim database version registry key – v2.0.50727.00000

The problem didn’t manifest itself in any way that affected the user, or application, that I know of. In other words, the user did not complain. But I figured I should fix the “problem” anyway.

Solution: Using regedit, go to HKLM\Software\Microsoft\.NETFramework\Policy\AppPatch\ and right-click on key v2.0.50727.00000.  Click on Permissions and grant the user Read/Write (Full Control) privileges.

Note: User’s machine running Windows XP Service Pack 2

Faulting application iexplore.exe, version 6.0.2900.2180

Problem: User’s Internet Explorer crashing alot. Event log registered the following error message on numerous occasions:

Faulting application iexplore.exe, version 6.0.2900.2180, faulting module unknown, version, fault address 0x00000000.



Almost ALWAYS, this error is caused by some third party adware app that’s installed. Sometimes it’s a fancy IE toolbar (not yahoo or google), such as some sort of “shopping assistant” , MyWebSearch, or HotBar toolbar. Stay away from these third party apps.  They claim they are not spyware or adware, but they are. In this particular user’s case, the user had screensaver software that they had downloaded from Screensaver.com.

Solution: Download SuperAntiSpyware, install it and update the definitions. Get yourself Revo Uninstaller and install it. Run Revo in safe mode, uninstall any third party toolbars or search assistant applications.  Revo scans and removes entries from the registry. Also in safe-mode, run a complete scan using SuperAntiSpyware. Next, check the MS System Configuration Utility (type “msconfig” at the run prompt – go to the Startup tab) to make sure there are no other unnecessary third party apps that run at startup.  Next, check the IE Add-ons (IE–>Tools–>Manage Add-ons) to make sure no unnecessary third party app is loaded when IE is launched. Finally, download and use HijackThis and the HijackThis Log Analyzer, if necessary, to remove the browser helper objects (BHO).

Note: User’s machine running Windows XP Service Pack 2