lorenzo milesi Posts

6 agosto 2017 / / italiano

Grazie all’attuale amministrazione comunale, ed in particolare a Gianni Vassena, negli ultimi mesi a Moggio è stato messo in atto un progetto per il ripristino della segnaletica dei sentieri presenti sul territorio comunale. Questa è stata l’occasione un po’ per tutti, me incluso, di riscoprire sentieri meno conosciuti (o in alcuni casi del tutto sconosciuti!).

Tra questi ho avuto modo di scoprire il Sentiero della Costa del Darden. In realtà non arriva propriamente ad Artavaggio ma in località Cassinelli, che in pratica è l’ultima curva a gomito a destra della strada agrosilvopastorale Penscéi – Maesimo.

1 agosto 2017 / / english

Quick and easy self note: when using Kartik plugins for Yii2, and including them in a Pjax container, some may need to be reinitialized.

Without getting crazy, Kartik already thought about this by providing a common property to all his widgets: pjaxContainerId. As the documentation states:

container ID if applicable inside which the widget will be rendered. If this is set, the widget will automatically reinitialize on pjax render completion.

So if you set that value to the ID of the pjax container, when the content is loaded the widget will be initialized correctly.

31 luglio 2017 / / english

I’ve used handle in the title because you cannot actually manage Access MDB tables from within PHP itself, and I didn’t want to add a misleading title just to attract people…

What you can do is import the data, and not even from PHP itself but by using external tools.

I’m showing the most I could achieve to import an Access file to MySQL, and then handle the data in there. Of course this way you cannot write data back to Access. And I hope it’s the goal of everyone else: who as of today is still relying on Access to store data?

Anyway, the only way I managed to get the data out of Access is using mdbtools. They’re some open source tools to get data from mdb files, so through exec‘s php function you can call them and obtain the informations.

25 luglio 2017 / / italiano

Oggi ho scoperto una funzionalità interessante del mio telefono Xiaomi Mi5: i dettagli sulla batteria.

Quando lo schermo è bloccato ed il telefono è in carica in basso compare la percentuale di carica della batteria. Passando il dito sul widget di carica comparirà una finestra con alcune informazioni utili sulla carica:

18 luglio 2017 / / english

As always in IT you have to deal with weird things daily.

We deployed VMware to a customer several months ago, and while in the need to perform some administration tasks we found out the vcenter6 web console wasn’t loading anymore. To be precise, after login we were redirected to a blank page. The same behavior was replicable on Internet Explorer, Microsoft Edge, Google Chrome and Mozilla Firefox. en plein!

Luckily the console was working on a box: a Windows 10 with Google Chrome 59.

7 luglio 2017 / / english
16 giugno 2017 / / english

We recently got in charge of an existing Zimbra installation, and the IT guy told me that users couldn’t change their password.

At first I thought there was external authentication enabled against their AD/LDAP directory, but checking in the domain settings the auth was internal.

Then by digging into Zimbra configuration attrs list, and searching first for password, on the second page I find an intriguing parameter:

14 giugno 2017 / / english

We mainly use KVM as virtualization hypervisor, but sometimes we have XenServer installations. Often in these situation we deploy a firewall as a Virtual Machine, but sadly pfSense, or better FreeBSD in general, has networking problems in virtualization environments.

The typical situation when pfSense is installed is that:

  • networking is fine on the hosts of the LAN. The VMs work fine in the LAN;
  • the hosts on the LAN can access internet without problems;
  • XenServer host and other virtual machines can ping outside, but almost all TCP connections doesn’t work, inbound or outbound.

To solve such problems with KVM it’s enough to Disable hardware checksum offload in pfSense’s advanced network preferences. But this doesn’t apply to XenServer.

6 giugno 2017 / / english
1 giugno 2017 / / english

I recently ran into a nasty issue: when accessing a MSSql database from Linux with PHP and through FreeTDS I had some characters displayed wrong, like ° or similar. Everything was working fine, queries were ok, but for example in Adminer i saw weird characters in replacement of the good ones. After tweaking a bit with FreeTDS config I also had other errors, like


Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier

when displaying table structure.