If you’re using Matomo (previously Piwik) on MS IIS and MariaDB and you’re getting a lot of these:
[06-Jun-2018 11:56:36 UTC] Error in Matomo (tracker): Error query: SQLSTATE: Invalid datetime format: 1366 Incorrect string value: '\xC3_\xC6\x92\xC3\x82...' for column 'name' at row 1 In query: INSERT INTO matomo_log_action (name, hash, type, url_prefix) VALUES (?,CRC32(?),?,?) Parameters: array ( 0 => 'website.com/Ă_Ć’Ă‚Â˘', 1 => 'website.com/Ă_Ć’Ă‚Â˘', 2 => 1, 3 => 1, )
You can use my fix (because literally nothing that can be found in the internet is helpful in this case).
Continue reading Brutal fix for “Incorrect string value:” error in Matomo (Piwik)
Version 2 of PostgreSQL backup script. It uses PowerShell and json file for database settings declaration.
This post was created in cooperation with Adrian Ligiewicz.
Continue reading Backup script for PostgreSQL with zip support 2.0 [using PowerShell]
Simplest solution for backing up PostgreSQL databases. With this bat file you can dump one database to a file and compress it using 7-zip.
PS. If you want a date in your filename simply add %date% var to it’s string.
PS2. Of course check your paths before complaining it does not work 😛
:: Global config
SET PG_BIN="C:\Program Files\PostgreSQL\9.6\bin\pg_dump.exe"
SET ZIP_BIN="C:\Program Files\7-Zip\7z.exe"
:: Database config for
%PG_BIN% -h %PG_HOST% -p %PG_PORT% -U %PG_USER% %PG_DATABASE% > "%PG_FILENAME%"
%ZIP_BIN% a "%PG_FILENAME:~0,-4%.zip" "%PG_FILENAME%" &DEL "%PG_FILENAME%"
@echo Backup Taken Complete %PG_PATH%%PG_FILENAME%
This guide will show you how to install fonts on remote machine using PsExec.
Continue reading How to install fonts on Windows remotely
Everyone who uses Windows inside Virtualbox on Linux machine (and shares host folders) knows this problem.
Continue reading How to get rid of :Zone.Identifier files
If you’ll ever have problem with opening (fopen) and reading (fread) files larger than 2 GB in your PHP script. Check your version of scripting engine. In my case switching to 64 bit solved the problem. Please mind that this error is very hard to debug because PHP does not log anything (same as MS IIS) in such case. It simply resets client connection…
This is really quick tip (cmd commands):
dsquery user -limit 10000 | find /c /i "OU="
To count users.
dsquery computer -limit 10000 | find /c /i "OU="
Here you can find how to create paths.
This one was little bit tricky. If you want to pack files on your IIS webserver follow my guide. Continue reading How to pack directory using 7-zip in PHP on Windows?
In case you ever wondered why your task returns 0x1 in Last Run Result instead of 0x0. Check if your task is trying to create any files, if it does, you must tick “Run with highest privileges” in General tab of your task properties. I’ve spent some precious time to uncover that because I’m not a native Winblows administrator 🙂