Laravel shows blank page on ubuntu, apache and php 7.0

When I tried to migrate one of my sites to the new cloud hosting, the blank page occurred. The new hosting had clean new ubuntu, apache 2 and PHP 7.0 installed.
Even after setting debug to true in app configuration file there was still blank screen. Laravel error log was also empty, so there was no information what was wrong.

The first step to fix this problem is to find some error information. To do this add the I added the following setting in Laravel index.php file.

error_reporting(E_ALL);
ini_set('display_errors', 1);

After that the error messages finally showed up.

Now the first error message showed:
Call to undefined function Illuminate\Foundation\Bootstrap\mb_internal_encoding()

The fix for this was:

sudo apt-get install php7.0-mbstring

And after that restart of apache service

After this was fixed the next error showed up:

Use of undefined constant MCRYPT_RIJNDAEL_128

This was fixed by the following steps:

sudo apt-get update
sudo apt-get install mcrypt php7.0-mcrypt
sudo apt-get upgrade

Read More

Wake on LAN over internet when your router does not support port forwarding

If your NAT router does not support port forwarding or adding static ARP entries you are out of luck (like me). Or maybe not. There is one more option to achieve Wake on LAN over internet.

You can use your old android device which is always online and connected to your home network. The idea is that when you need to wake your home PC you connect to your android device over internet and remotely start WOL application installed on it. Read More

Enable remote desktop on remote computer with Windows 7

The steps are following:

  1. Go to Start menu and enter regedit to start Registry editor
  2. From file menu select “Connect Network Registry”
  3. Enter computer name and press enter
  4. When the wanted computer is found browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
  5. Double-click on fDenyTSConnection and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled)