Faster Import of InnoDB Tables in MySQL

After waiting for more than an hour to import a MySQL dump of ~270 MB I started looking for the bottleneck. My database was mixed with InnoDB and MyISAM tables and it turned out the InnoDB tables took ages to import. I fixed it by wrapping my SQL statements for the InnoDB tables with the following statement:

SET autocommit=0;
# table definitions for the InnoDB table 

If I understood it correctly this reduces the disk input massively. Don't forget the COMMIT statement at the end, as the MySQL reference says:

After disabling autocommit mode by setting the autocommit variable to zero, changes to transaction-safe tables (such as those for InnoDB, BDB, or NDBCLUSTER) are not made permanent immediately. You must use COMMIT to store your changes to disk or ROLLBACK to ignore the changes.


Issues with Moneyscripts File Download Suite

I just had a hard time to set up the paid Drupal module File Download Suite with PayPal as a the payment method. Payments got stuck, emails haven't been sent and user accounts weren't created when they should have been.

Here's what I did to solve the issues and finally making successful purchases:

  • remove any .htaccess password protection on the dev site
  • set up my PayPal (sandbox) account to auto-accept payments in any currency (accept and convert them automatically), you find this option somewhere hidden in your merchant accounts selling preferences
  • don't use the module Automatic User Names as it will throw PDO exceptions when moneyscripts tries to create a new user account for your order

Now there are only some translation issues left to be resolved and everything will hopefully work as planned.

Easier than expected: A Month without Social Media

Yesterday my 30 Days Without Social Media Challenge came to an end. Here are my experiences and the conclusions I made.

1. I didn’t miss Facebook and Twitter half as much as I would have thought

While in the first week I caught myself quite often trying to open the app or website of either Facebook or Twitter it quickly slipped out of my mind in the second week. Instead of just browsing around, looking what everybody is doing and posting general stuff I started reaching out more to people directly via email, text, IM or phone, which is way more satisfying than just posting something and waiting for interaction. That’s definitely a habit worth keeping.

2. Twitter is more important to me than Facebook

As I know most of my Facebook friends in real life I usually have other and better ways of reaching out to them. That is, at least for the ones I care about most.

Less RAM for Drupal 7 with PHP 5.5

There seems to be a significant performance gain with Drupal running on PHP 5.5. The average memory usage on memory-hungry Views went down ~50% on a site I switched to PHP's latest version. Seems the newly introduced OPcache works really well. If you're not afraid of some warnings about the usage of (now) deprecated functions - go ahead and try it.

If your hosting company doesn't offer PHP 5.5 it's time to reconsider: give Uberspace a shot, they have 5.5 as default (and they also have an easy way to change to other versions, of course). Actually, even if your host does offer PHP 5.5, you should consider switching ;)

Don't call me Custom

Just a quick one: Save yourself some trouble and don't ever name your Drupal module anything that ends on _custom, it'll save you some headaches. For example getting unexplainable errors like Warning: Illegal offset type in isset or empty in drupal_theme_access () (line 53 in includes / despite being quite sure you did everything right.

This will happen as soon as your module implements hook_theme.

I found this out thanks to Spiderneo blogging (en francais!) about it. Merci beaucoup :)


Hooray for Uberspace!

Once more I'm more than impressed with Uberspace. We just had a Drupal site killing an entire dedicated server hosted at All-Inkl. As nobody of their tech support seemed to be able to help us I decided to quickly copy the entire site to Uberspace, just to check if it might run there. And boy, it does! Way faster than expected, for a tenth of the price of the dedicated server. I'm really grateful there's such an amazing service available and I can't praise them highly enough.

A call for more secure instant messaging: Threema

Maybe now (as Facebook is on a shopping spree, buying Whatsapp for $ 19B) is a good time to try to convince some more people of a better instant messaging service. I'd really like to see Threema being adapted more wideley, but hardly anyone I know is using it right now.

Come on folks, paying € 1,60 for a good, app that respects your privacy and a service without recurring costs is really not that bad of a deal. So go and grab it:

By the way: you don't need to give Threema your number or email address, yet you can do it if you want your friends to find you conveniently.


30 days without Social Media

I got inspired to do this watching Matt Cutts: Try something new for 30 days. If I succeed you won't see me around Facebook, Twitter, Tumblr, Instagram and the like until March 21st. My 8:36pm project, however, will continue as usual.

In case you feel like contacting me, why not take the old school approach and send me an email: hello at wentsch dot me.

Here's some inspiration for more 30 days challenges. I'm wondering if I got the balls to do the the Talking-to-a-stranger-each-day challenge, though I must confess it would be a real tough task for me.

Let me know if there's a thing you wanna try for 30 days!