Posts

  • Fix Magento 1.9.3 ‘Notice: Undefined index: session_expire_timestamp in … on line 461’

    Some days ago the Magento security update SUPEE-8788 was released. This update fixes a number of critical vulnerabilities. To fix an existing shop one could either apply the SUPEE-patch or upgrade the shop to Magento 1.9.3. However, after updating I experienced a little issue when trying to reach the shop again. 

    A PHP Exception popped up:

    Notice: Undefined index: session_expire_timestamp  in /data/web/public/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 461
    

    Even after flushing the cache this problem appears. The undefined index and path of the file that raises the exception gives away that this problem might have to with Magento’s session handling. I started with deleting any existing session cookies in my browser. This made the error message disappear. Be aware that this is not an appropriate solution to this error!

  • Implementing a MATLAB digital filter or controllers in C++

    Controllers and filters are often a good way to stabilise a system, condition a signal or make a system follow a reference. The usual approach is to model the system or signal in an application like MATLAB and then design a filter or controller. Either by applying design rules, some sort of optimisation algorithm or tuning parameters experimentally. When the design is finished the controller or filter is not ready for use yet. It is still necessary to realise it in practice. This is often done digitally on a micro controller or real-time computer. This article will describe a effective, open and fast approach to realising a filter or controller in C++.

    Step responses of Butterworth Low-pass Filters
    Step responses of Butterworth Low-pass digital filters with different cut-off frequencies
  • Update Rooted Nexus 6P to Android 7.0 Nougat with FlashFire

    Android 7.0 is out! I’m really wondering about the split view mode and the new notification. I wanted to upgrade my Nexus 6P as soon as possible. The update was not available as an OTA for my phone yet so I had to take a simple measure to make it available. Furthermore my phone is rooted so I had to use a flash tool or the adb/fastboot tools to upgrade. First, we will enable the update. Then we download it. Next we use FlashFire to flash the firmware to the device (dangerous). Finally we will hopefully try to boot into the newest Android version.

    The steps below will most certainly work for all recent Nexus devices like the Nexus 6 and Nexus 5X. The older Nexus 5 is not supported officially so it will depend solely on community effort.

  • Running JIRA Software securely behind Apache with ISPConfig 3.1

    If you use both JIRA and ISPConfig on a server you might want to set-up a reverse proxy to serve the JIRA frontend securely on the standard HTTPS port just like other websites in your ISPConfig setup. ISPConfig uses Apache to serve websites whereas JIRA has its own web-server (Tomcat). It is not straight-forward to share a single port such as the HTTPS port 443 between two applications. The Apache Reverse-Proxy feature allows us to do so however.

    Secure JIRA using Apache Reverse-Proxy
    Secure JIRA using Apache Reverse-Proxy

    Advantages of using a reverse-proxy instead of serving JIRA on a different port are as follows:

    • Single entry-point for all web traffic
    • Access- and certificate management in one place (Apache via ISPConfig)
    • Only one or two (HTTP/HTTPS) ports need to be opened to the public
    • No need to specify the port when navigating to the JIRA instance
    • Allows traffic and statistics monitoring through Apache
  • Random Midpoint Displacement Fractal (RMDF)

    The Random Midpoint Displacement Fractal (RMDF) is a fractal this is often used for generating height-maps, landscapes, rough surfaces and more. Its implementation is simple but the results are interesting, especially when a nice color-map is applied to the matrix and it is shown as a 3D-surface.

    Example of a Random Midpoint Displacement Fractal

  • Free SSL certificates: use Let’s Encrypt with ISPConfig 3

    View of the Chrome Certificate info pane for tomlankhorst.nlAs you might have noticed this site uses HTTPS. Obtaining SSL certificates was always a bit of a hassle. Finding a certificate authority, doing regular payment, renewals and installing the certificate on your server. Let’s Encrypt is an initiative to provide a better way of enabling encryption on websites. It is open, automated and above all: it offers free SSL certificates. Learn to use Let’s Encrypt on an ISPConfig 3.0 server.

    I assume you already have an ISPConfig server up and running. You might have a number of sites that use plain HTTP of HTTPS that you want to secure with free SSL certificates. That’s good, we’re going to do the following:

    1. Obtaining certbot
    2. Requesting free SSL certificates
    3. Configuring SSL in ISPConfig
    4. Enabling automatic periodical renewal
  • Matlab2Tikz: Perfect MATLAB Figures in LaTeX

    MATLAB exported TikZ picture with custom stylingPapers and reports can’t do without both but integrating MATLAB figures in LaTeX is not so obvious. Different methods for exporting and including graphics exist but have various downsides like inconsistent scaling, wrong fonts and strange spacing. The best method I have come across so far is using matlab2tikz. It is a MATLAB script that is able to extract all relevant details out of a figure and convert it to PGFPlots (a LaTeX package).

  • Estimating transmission time of a DecaWave DW1000 UWB transceiver frame

    I like to share with you my C implementation for estimating the DecaWave transmission time because it has been created with help from the community and thus should be shared with it.

    The DecaWave DW1000 is a versatile ultra-wideband transceiver that enables long range and fast communication. Due to its wide spectral width it is able to occupy a very narrow temporal with. Precise time-stamping then allows for estimating the time-of-flight which in turn can be used for determining the distance between two nodes.

  • Form submission CSRF issues in Magento 1.9.2.2

    Magento now includes CSRF (Cross-Site Request Forgery) protection on publicly available forms such as the new user registration form. The goal of this is to make it impossible for anyone to POST to an URL without first visiting the corresponding form page. A token is supplied on this page that is sent along with the rest of the form to the server. The server validates the correctness of the token and responds in a sensible way if the token is correct. If the token is not however, the server ignores the POST request.

  • Fix Magento 1.9.2.2 ‘Notice: Undefined variable: block in …/Template/Filter.php line 187’

    This problem arose after upgrading to Magento 1.9.2.2. which is a patch release that patches a number of security flaws in Magento. After installation of the patch some parts of the front-end template stayed blank. Review of the exception.log file shows a number of exceptions that seem to occur from the template filter classes of Magento.

    The error is:

    exception 'Exception' with message 'Notice: Undefined variable: block  in /data/web/public/app/code/core/Mage/Core/Model/Email/Template/Filter.php on line 187' in /data/web/public/app/code/core/Mage/Core/functions.php:245

subscribe via RSS