I just had a clients wordpress website die on him after updating to wordpress 4.2.1. It took me a lot of testing and debugging, but finally I figured out that the follow line caused the problem:

$wpdb->insert('videos', array(...), array(...));

WordPress behaves differently now. Before the update, wordpress truncated strings if a database text field (varchar) was too small for the text to fit. Now $wpdb->insert() doesn’t do anything, gives no error message and also inserts nothing.

My fix was to manually truncate the strings with http://php.net/manual/de/function.substr.php

Of course I also could have increased the columns varchar size, but in this specific case only the first 100 characters were needed.


1st step: Generate the private key

D:\work\projects\ios_dev_flash>c:\Users\mako\Downloads\openssl-0.9.8s-x64_86-64\openssl.exe genrsa -out mykey.key 2048
 Loading 'screen' into random state - done
 Generating RSA private key, 2048 bit long modulus
 e is 65537 (0x10001)


2nd step: Generate a certificate signing request for Apples IOS Developer Center

D:\work\projects\ios_dev_flash>c:\Users\mako\Downloads\openssl-0.9.8s-x64_86-win64\openssl.exe req -config D:\xampp\apache\bin\openssl.cnf -new -
key mykey.key -out CertificateSigningRequest.certSigningRequest  -subj "/emailAddress=donotask@notboringfake.org, CN=Malte Koehrer, C=DE"
Loading 'screen' into random state - done

Note: Only use ASCII characters for the Signing request infos. Special characters like german Umlaute will give you a “4200:error:0D07A07C:asn1 encoding routines:ASN1_mbstring_ncopy:illegal characters:.\crypto\asn1\a_mbstr.c:162:” error.

3rd step: Uploading the certification signing request at the IOS Developer site

Follow these steps:


Confirm the next screen, then click the “Chose File” button, select the certificate signing request and hit the upload button. Now you can press the “Generate” button to generate the certificate.

4th step: Downloading the certificate

Press download here to download the file “ios_distribution.cer”:


5th step: Converting the .cer certificate to a PEM one

D:\work\projects\ios_dev_flash>c:\Users\mako\Downloads\openssl-0.9.8s-x64_86-win64\openssl.exe x509 -in ios_distribution.cer -inform DER -out developer_identity.pem -outform PEM

6th step: Combine the private key (.pem) and the certificate (.cer) into a .p12 file

D:\work\projects\ios_dev_flash>c:\Users\mako\Downloads\openssl-0.9.8s-x64_86-win64\openssl.exe pkcs12 -export -inkey mykey.key -in developer_identity.pem -out iphone_dev.p12
Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:

That’s it, you now should be able to use the .p12 file along with your mobileprovision file.

One of my projects which was based on a .hxp build file caused a problem and stopped compiling with the previous version of lime tools because there were changes in the latest haxelib versions.

The error message was:

D:\work\projects\[private]\project>haxelib run openfl build flash
Class not found : project.HXProject

Joshua Grannik explained that the project.* name space was moved to lime.project.* but a first test didn’t give positive results:

import lime.project.HXProject;

D:\work\projects\[private]\project>haxelib run openfl build windows
Class not found : project.HXProject

But with todays haxelib upgrade a new version of lime tools that worked this way, has been release. Now lime.project.* was avaiable.

A simple

import lime.project.*;

fixed it all and the project was compiling again

First install Visual Studio Express 2012:

http://www.microsoft.com/de-de/download/details.aspx?id=34673 [german]
http://www.microsoft.com/en-gb/download/details.aspx?id=34673 [english]

Then download the latest version of cocos2d-x:

http://www.cocos2d-x.org/download [Currently: Cocos2d-x -> Download v3.3 (latest)]

Unpack cocos2d-x to the root folder of a fast drive with enough space:

Unpacking cocos2d-x to a local windows 7 folder

Unpacking cocos2d-x to a local windows 7 folder

Now open the Cocos2D-X Visual Studio Express project:

Open the Cocos2d-x Visual Studio 2012 project

Open the Cocos2d-x Visual Studio 2012 project

Confirm that you trust the project even though it’s from a “non trusty source”. After that you should see multiple entries listed in the project explorer. Right click the “cpp-tests” entry and select “Set as StartUp Project”:

Cocos2D-X Set cpp-test as Start Up project

Cocos2D-X Set cpp-test as Start Up project

Now hit the compile button:

Cocos2D-X Visual Studio Compile Button

Cocos2D-X Visual Studio Compile Button

You will most likely get an error about outdated projects, just hit “yes” to confirm you want to update them. The Visual Studio Output will start to show progress updates along several warnings that can be ignored. As soon as the compilation is done, the tests application will be started in a new window:

Cocos2D-X Visual Studio Cpp Tests Running

Cocos2D-X Visual Studio Cpp Tests Running

That’s it, you just compiled your first Cocos2D-X application.

Enabling hxcpp debugging in a haxe or openfl project is easy if you use the standard xml project file. It’s also no rocket science to activate it in a .hxp file, just undocumented.

Here’s a quick example on how to enable the haxe debugger:

haxelibs.push(new Haxelib("hxcpp"));
haxeflags.push("-D HXCPP_DEBUGGER");
haxelibs.push(new Haxelib("debugger"));
haxeflags.push ("-debug");

Tested on Windows but should work on any platform or system that’s using hxcpp.

If you use the Fat Free Framework to deliver javascript, you need to set the contents mime type to ‘application/javascript’ (‘text/javascript for IE 8 and previous versions).

You tried to use PHPs header() function to do so but the header type still is wrong.

How not to set the headers mime type for F3 Views

header('Content-Type: application/javascript');
echo View::instance()->render('profile_js.js');

How to set the header mime type using Fat Free Framework

The reason for the wrong mime type most likely is the script calling View->render() which has a single parameter in most but examples but also has an optional second parameter to pass the mime type. This parameter defaults to text/html, the call will overwrite the previously set header. If you set the second parameter the mime type will be correctly output:

echo View::instance()->render('profile_js.js','application/javascript');

Officials documentation on setting the header mime type in Fat Free Framework


I was getting tired of using Haxe/OpenFL’s application.xml file because it was too unflexible for what I needed to do. I did some research and noticed that you now can actually write real build scripts using the Haxe language.

The process was easy and straight forward since the new building scripts are documented well:


The only thing these docs missed was the informations on how to actually add a swf library using the HXP build script. To figure that I checked the source of the new build system. It’s part of lime-tools, so that’s where I had to take a look:


Oh, hi there:

	public var libraries:Array<library>;

(Please ignore the closing library tag, wordpress adds it and I don’t have the time right now to figure out how to change that)

So the libraries get saved in an Library typed Array. That’s easy to handle, take this case:

<library path="assets/swf/library.swf">;

With the new HXP bulding system, that line looks like this:

libraries.push(new Library("assets/swf/library.swf"));

And done. That’s one of the things that I really enjoy about Haxe. If you know where to find your sources, you can easily look everything up yourself. Thanks Haxe/OpenFL team!

I’ve needed to create a bitmap font for an OpenFL project with BMFont. The font that I wanted to use was Lithos Black. To my surprise that took a lot of effort.

At first I tried selecting the font face, but BMFont has no way to select a spefic font face. Then I tried the .ttf-File option, but BMFont completely ignores what the user configures as font file, it only uses the selected font.

BMFont groups font faces into a single entry

After some research I realized that BMFont grouped several Lithos font faces into a single entry with no way to select a specific font face.

A simple fix: Deleting unneeded font faces from the windows fonts folder

To fix that I could have deleted all font faces that I didn’t need for the bitmap font. But I didn’t want to constantly change active fonts on my development system just because BMFont lacks in the font face field.

The lesser intrusive method: A virtual machine

In the end I decided to use a blank windows 7 virtual machine. I only installed the font face I needed and BMFont. With just one font there’s no grouping that hides font faces. And thanks to VMWare tools, the whole process is manual but fast and easy. I am not happy that I didn’t find a way to fully automate the process but I rarely need to redo bitmap font files, so decided to work with it for now.

When using mysdqldump to export all databases of a server I ran into the error message “Can’t backup the mysql table with mysqldump. SELECT,LOCK TABL command denied for ‘cond_instances'”.

I checked the tables and noticed that I added a few tables too many into the list of tables to be backed up. I excluded them and the error disappeared.

Here’s a list of the tables that I had to remove:

MySQL Dumper Error