Skip to main content

How to increase the 2GB memory limit of a 32-bit (x86) EXE in 64-bit (x64) Windows

If you’re reading this, you are most likely dealing with an issue regarding a 64-bit Windows machine (such as Windows 2008 Server, Windows 2012 Server, Windows 7, Windows 10 and so on) and a rather old, 32-bit (x86) executable file with some memory issues.

If you already did some research, you might also be already aware of the fact that any single 32-bit application can use a maximum amount of 2GB of RAM, regardless of what your system actually has. This basically means that you cannot fix your issue with an hardware upgrade.

This leaves you with two alternatives, both software-based:

Read More

How to check if a binary file is 32 bit (x86) or 64 bit (x64) on Windows

Yesterday we had the urgent need to check if a rather old executable file that we still use on one of our x64 Win2012 production servers to do some automation tasks was built for an  x86 or x64 machine type. Normally you know that in advance, but the guy who originally built the file was no longer with us and both the file name and the folder wasn’t clear about that.

The tool we did use to solve our issue was the great Sigcheck by SysInternals, which is available here for free.

Once downloaded and unpacked, using it is as simple as type the following in the command-prompt:

Read More

Strip out numeric or non-numeric characters in string with ASP.NET C#

If you’re working with ASP.NET C# and you’re looking for something that could strip out numeric or non-numeric characters from a string, you might find these helper methods useful enough.

I wrote these methods to give an additional answer to this StackOverflow question, mostly because the accepted one didn’t handle null values: the behaviour of each one of them is well-documented within the <summary>  text, hence there’s nothing to explain here.

If you like them, feel free to leave a comment!


Catchable fatal error: Object of class WP_Error could not be converted to string – How to Fix

On 11 June 2017 this website experienced a serious downtime that was caused by a very odd error occurred within the WordPress database. If you’ve stumbled upon this post, chances are you might be affected by the same issue.

The issue looked like a standard HTTP 500 – Application Error that blocked any non-cached page. As usual, the first thing I did to read the actual error was to enable the WP_DEBUG and WP_DEBUG_LOG switches within the wp-config.php file, which – as you most certainly know – is located inside the WordPress installation root folder:

As we can read in the above comments, the first of these switches shows the error within the HTTP response, while the latter writes it into a dedicated debug.log file.

Anyway, this is the actual error:

Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/\wp-includes\rewrite.php on line 326

Sadly, the given info were not enough to shred much light. I briefly took a look to the rewrite.php source code, finding the following function (line 326 is the highlighted one):

Read More

Mantis BugTracker – How to change a bug date and time (with all related notes, history and info) with a bunch MySQL scripts

If you found this post you most certainly know Mantis BugTracker, also known as MantisBT, the award-winner open-source bug tracking platform built with PHP and MySQL. If you use it a lot, you likely already know that the software doesn’t allow you to change the date and/or the time of basically anything it tracks, such as: bug entries, notes, comments, status changes. Even if you’re the platform administrator, there’s no chance you can do that relying to the built-in commands.

This behaviour shouldn’t sound surprising at all: the main purpose of issue-tracking software is to track the user activity, including those performed by the system administrators. Altough this is generally a good thing, there are some edge-case scenarios where altering these dates could be really useful: for example, when we need to restore an old backup and fill it with the “missing” tasks lost due to a DB crash.

When such a scenario occurs, this set of queries might come to the rescue:

Read More