## 30. July 2015

### eclipse: Java was started but returned exit code=-13

Filed under: Windows — Christopher Kramer @ 22:47

What the hell does this mean? For me, it meant: Eclipse 64bit and Java 32bit installed.

Hope this helps somebody 😉

## Recommendation

Try my Open Source PHP visitor analytics script CrazyStat.

## 21. May 2015

### wp-cli: syntax error, unexpected ‘?’, error connecting to the database

Filed under: Server Administration,Windows,Wordpress — Christopher Kramer @ 10:55

Running wp-cli on a website that was set up by somebody else resulted in a strange error:

PHP Parse error:  syntax error, unexpected '?' in phar:///usr/local/wp-cli.phar/php/wp-cli.php(23) : eval()'d code on line 1
Error:
<h1>Fehler beim Aufbau der Datenbank-Verbindung</h1>
...

The database settings in wp-config.php were all correct and WordPress was also working, so this did not seem to be the problem. In the end, I found out the reason was a byte order mark at the beginning of wp-config.php that had been inserted probably by Windows Editor. To solve the issue, the easiest way is to open the file in a good editor, for Windows I recommend PSPad, copy everything into the clipboard (CTRL +A, CTRL + C), create a new empty file (CTRL + N), paste everything (CTRL + V), save it (CTRL + S) as wp-config.php and upload the file.

## 6. March 2015

### TortoiseGit: Windows for pull, push etc. take 5 minutes to appear, commit does not work

Filed under: Windows — Tags: , , , , — Christopher Kramer @ 21:14

My TortoiseGit showed a strange behaviour: When I tried to push or pull, the window took exactly 5 minutes to appear. The commit window did not appear any more. Reinstalling TortoiseGit did not fix the issue. I used the git Bash as a workaround for some time until I found a fix: TortoiseGit was not able to write into its temp directory because the security settings (NTFS rights) were somehow messed up. For the C:\Users\MyUser\AppData\Local\Temp\TortoiseGit, I added my user with full access rights and everything is now working again :).

Hope this helps someone to fix this faster in case someone has the same issue.

## 10. January 2015

### Retro game Ignition / Bleifuss Fun under Windows 7 using DOSBox

Filed under: Windows — Tags: , , , , , — Christopher Kramer @ 15:37

Remember this retro game?

When I was a child, I used to play this with my friends in split screen, which is fun 😀

I just found the old CD and wanted to get it running. This is the way that worked out:

2. Create an directory somewhere, e.g. “C:\Users\foo\dosbox”
3. Start DOSbox
4. Insert the Bleifuss Fun / Ignition CD into your CD drive (say it has drive D:)
5. Mount the CD in DOSBox:
mount d d:\ -t cdrom
6. Mount the directory you created in step 2 as c:
mount c c:\Users\foo\dosbox
7. Switch to the CD-Rom by typing:
d:
8. Start the installation by typing:
DOS_INST.EXE

9. Go through the installation by pressing Enter, leaving the default location (C:\BLEIFUSS.FUN\ will end up in C:\Users\foo\dosbox\BLEIFUSS.FUN on your drive)
10. Go into the installation directory
c:
cd BLEIFUSS.FUN
11. Switch into Fullcreen: ALT + Enter
12. Start the game by typing
BLEI_DOS.BAT

You can switch back from fullscreen with Alt + Enter and kill dosbox with CTRL + F9

You can increase the screen resolution under options to 800 x 600 to get the graphics a little better.

Next time you run the game, start Dosbox, insert the CD, mount it, mount c, go into the installation directory and start the game:

If you don’t want to insert the CD every time or don’t have a CD drive anymore, you can create an image of the CD using Daemon Tools and mount this into a virtual CD drive and mount this in DOSBox.

Of course this should work on any OS where DOSBox is running.

Have fun!

## 7. November 2014

### Amazon Instant Video and Error 1002

Filed under: Uncategorized,Windows — Tags: , , , , , — Christopher Kramer @ 20:40

Recently, when trying to watch a video in Amazon Instant Video, I only got Error 1002. I tried Firefox, Chrome, Opera and Internet Explorer and none of them worked. I reinstalled Silverlight and this also did not help.

Then finally I found the reason: Amazon still seems to use SSL 3 for Instant Video streams! Because Google recently reported security problems with SSL 3.0 (known as the POODLE security vulnerability), I disabled SSL 3.0 in all browsers including Internet Explorer. No matter what browser you use, Silverlight will use Internet Explorer’s settings and will not use SSL 3.0 any more. Re-enabling SSL 3.0 again in the Internet Explorer settings fixed the problem with Amazon Instant Video. As I am not really using Internet Explorer anyway, I don’t care much about this, but Amazon should really work on this to make Instant Video available without the need to enable SSL 3.0.

Happy streaming!

## 24. June 2014

### Inkscape: Problem importing PDF

Filed under: Windows — Tags: , , , , , , , , — Christopher Kramer @ 18:39

I just had problems importing a PDF into Inkscape. The PDF was an image of a graph generated by igraph for R. When importing, the circles of the vertices got replaced by the letter “q”.

I found the following workaround: I printed the PDF into a new PDF using FreePDF. The resulting PDF could then be imported into Inkscape without problems.

My original problem was that I wanted to include the graphs from igraph for R in Powerpoint as a vector graphic. As Powerpoint cannot include PDFs as graphics, I wanted to save the graphs as emf-Files. But the emf-Files exported by igraph for R look completely messed up when imported in Powerpoint. The PDFs exported by igraph for R are fine, so I wanted to import them into Inkscape and save them as emf. A bit of a long way, but it works and it does not result in an ugly pixel graphic.

Maybe somebody has similar problems and finds this useful.

## 9. June 2014

### Windows 7: On a multi-screen setup, place windows at one half of a screen

Filed under: Windows — Tags: , , , , , , , — Christopher Kramer @ 11:08

With Windows 7, you can easily move windows on one half of the screen by dragging them to the left or right edge of the screen. This is called “Snap” and is very handy. Watch Microsoft’s video on Snap if you don’t know it yet.

But on a multi-screen setup with two screens side-by-side, you can only place a window at the right half of the right screen or the left half of the left screen with Snap. You cannot place a window at the left half of the left screen because there is no “magic edge” there. Of course you can move and resize it manually. But there is a faster way:

[Windows-Key] + [Left arrow]

This places the window at these positions:

1. Left half of left screen
2. Right half of left screen
3. Left Screen
4. Left half of left screen
5. Right half of right screen
6. Right screen

Just press [Windows]+[Left] again to move it to the next position listed above. You can press [Windows] + [Right arrow] to move it the other way round (starting to the right half of right screen).

I don’t know if any other Windows version supports this as well, I guess at least Windows 8 supports it as well (in desktop mode).

Happy window-moving! 🙂

## 16. May 2014

### Inkscape: Dialog windows do not open on multi-screen setups

Filed under: Windows — Tags: , , , , , , — Christopher Kramer @ 17:06

I am using a multiscreen setup with one small landscape screen and one big portrait screen.

When I try to open a dialog like the Inkscape settings or the document settings in Inkscape, it does not open. Or more precisely, I cannot see it because it is positioned outside the visible area. I have this problem with current Inkscape 0.48.4 on Windows 7 Professional 64bit.

The bug is known for some time but unfortunately not fixed.

But I found a great and easy workaround which I want to share with you here: Whenever you cannot see a window because it is offscreen, press [Windows-Key] [arrow-up-key]. This shortcut maximizes the current window and you can use it normally. This probably only works on Windows 7 and newer.

You can also use the left or right arrow-key to position the window on the left or right half of the screen.

Happy drawing! 🙂

## 23. April 2013

### Enlarge dynamic and fixed VHD virtual hard drives

Filed under: Windows — Tags: , , , , , , , , — Christopher Kramer @ 23:42

If you use Virtual PC or built-in Windows backup for example, you probably use virtual hard drives stored in vhd-files.

I already blogged once about how you can mount such a vhd file easily in Windows.

But there is one big problem with vhd files: When you create them, you often don’t really know how big the file should be. You can use a dynamic vhd to solve this partly (at the cost of performance), but still you need to give a maximum size.

And then the time will come when you realize your vhd needs to be bigger then you specified it. So here is how you can enlarge vhds – no matter whether they are fix sized or dynamic.

### Enlarge vhd file using diskpart

You can enlarge the vhd file in diskpart. Start diskpart, e.g. with [Windows-Key]+[R], type “diskpart” and hit [enter]. UAC will prompt you for permission (say “Yes”). So now select your virtual disk using the following command:

select vdisk file="C:\path\to\vdisk.vhd"

Now enlarge the disk using this command:

expand vdisk maximum=10000

In this example, 10000 means that the new total size of the disk is 10 000 MB (adjust the number to your needs).

So now your virtual hard drive grew larger. But the partition inside still has the old size. So you need to enlarge the partition as well.

### Enlarge the partition in the virtual disk using Disk management

The easiest way to do this is to use Windows Disk Management, which is part of Computer Management . The fastest way to get there in Windows 7 is to click the Windows icon and enter “Disk Management” and start the appearing “Windows Disc Management” (Windows UAC will again ask you for permission, say “Yes”). Or, also for other Windows version, [Windows]+[R] and type “diskmgmt.msc” and hit enter.

Open the VHD with “Action” / “Attach VHD”. Choose the file, make sure “readonly” is not checked and click “OK”.

Then you will see the VHD just like your normal drives in the graphical overview. There you will see the partition in blue (or dark green, if it is a logical one) and the empty space in light green. Right-click the partition and choose “Extend Volume”. The tool  will propose to use all the empty space so you can just accept that and that’s it. Finally, right click the VHD drive and select “Detach VHD”. Make sure you don’t select the option to delete the VHD file after detaching!

### Enlarge the partition in the virtual disk using diskpart

You can also achieve the same thing in diskpart (i.e. on the console, not using the GUI).

Open diskpart, and mount the VHD using:

select vdisk file="C:\path\to\vdisk.vhd"
attach vdisk

Then do

list volume
select volume=<No of volume>
extend size=100

Instead of <No of volume>, you need to enter the number of the volume (see output of “list volume”).

In this example, the partition gets enlarged by 100 MB. Here you need to specify the relative amount of space that gets added.

Finally, detach the vdisk:

detach vdisk

I hope this helps somebody. If so, please drop a comment. If you have problems, also just drop a comment.

## 13. March 2013

### TortoiseSVN: after stopping merge, workspace is “locked”

Filed under: Windows — Tags: , , , , , , , , — Christopher Kramer @ 20:43

TortoiseSVN is a great Windows Application to access (and even create) SVN repositories. It integrates perfectly into Windows Explorer and has very good merge and diff tools. In my opinion it’s simply the best Windows SVN client available. If you don’t use it already, you should give it a try.

### Problem: Working Copy locked after Merge failed

When I tried to apply a patch using TortoiseSVN, I noticed I wanted to apply another patch instead and therefore closed the merge program before it was started completely.

After this, I was not able to apply the other patch. TortoiseMerge said the workspace was locked:

TortoiseMerge: “Workspace copy is already locked”

It was also not possible to update the workspace:

Update: Working Copy is locked

So I tried to unlock it, which is not possible:

TortoiseSVN: “There is nothing  to unlock”

So this is pretty strange. Here is how to solve it:

### Solution: Clean up working copy status

Right-click on the directory and choose “TortoiseSVN”/”Clean Up”.

TortoiseSVN: Clean up

Then only choose “Clean up working copy status”:

TortoiseSVN.:Clean up working copy status

Click “OK” and that’s it. You can now again update or apply patches without any problems.

I hope this helps somebody to solve his problem a little faster.

Older Posts »