Category: Windows
Brutal fix for “Incorrect string value:” error in Matomo (Piwik)
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[22007]: 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 […]
Backup script for PostgreSQL with zip support 2.0 [using PowerShell]
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.
Backup script for PostgreSQL with zip support (Windows)
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 😛 @echo off […]
How to install fonts on Windows remotely
This guide will show you how to install fonts on remote machine using PsExec.
How to get rid of :Zone.Identifier files
Everyone who uses Windows inside Virtualbox on Linux machine (and shares host folders) knows this problem.
How to setup your IIS to handle very long PHP execution?
This might be useful when serving file downloads or uploads using PHP.
PHP reading problem with files larger than 2 GB
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 […]
How to count computers and users in Active Directory?
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.
How to pack directory using 7-zip in PHP on Windows?
This one was little bit tricky. If you want to pack files on your IIS webserver follow my guide.
Cryptic error 0x1 in Windows™ Task Scheduler
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 […]