Fix “This field was locked by vendor” in Plesk Updates source and installation settings

I was trying to install some new components to one on my Plesk managed servers but I got this error when going to “Server > Tools & Settings > Plesk > Updates and Upgrades”:

Failed to read product information from the file : Can't process products.inf3: Failed to download the package The requested URL returned error: 404 Can't process versions.inf3: Failed to download the package The requested URL returned error: 404

I asked OVH technical service and they told me more or less this: “Yep, that URL is no longer available but we only provide it on first automated install. Fix it yourself.”. I have to say that this happened with the customer service from Spain, something that of course didn’t surprise me. We are used to this kind of “help” from customer services here.

So I tried to change the product information source to the official Plesk one but I noticed that the field was disabled, as it said “This field was locked by vendor.”.


I started to search for the original URL in /root/parallels in order to edit it with no luck. When I did a search for this problem on the Internet I got to the most surreal fix I’ve ever come around: Open the browsers devtools and remove the “disabled” option to the “URL to the directory with .inf3 file” input field, change the URL to the correct one ( and click “Save”. It worked!




Hide Mac OS X Recovery partition

Sometimes the Mac OS X Recovery partition can be seen because it’s mounted automatically on boot. This is usually caused because you moved the operating system to another disk (clone) or because you used an app that changed the disks partitions (rEFInd in my case).

Recovery HD

To fix this you can run this script:


PARTITION=`mount | grep "Recovery HD" | awk '{print $1}'`
if [ -n "$PARTITION" ]; then
    sudo diskutil unmount $PARTITION
    sudo asr adjust --target $PARTITION -settype Apple_Boot

Then SHUTDOWN (don’t just reboot) and turn on the computer.

You can also unmount that partition from the Disk Utility if you enable the debug option from the command line, but this will only work one time as it will be mounted again on next boot:

$ defaults write DUDebugMenuEnabled 1



Remove old Linux kernels in Ubuntu

As time goes new kernel versions are released. After a kernel update old installed versions are not removed automatically, they are keep in case something goes wrong so you can boot again to a previous version.


But you may end up having lots of old versions you’ll never use. To remove them first you need to find all the installed versions:

$ dpkg -l | grep linux-image | grep -v extra | awk '{print $2}'

Then remove all the unwanted versions using apt-get autoremove:

$ sudo apt-get autoremove linux-image-3.16.0-30-generic linux-image-3.16.0-31-generic linux-image-3.16.0-34-generic

You should probably leave at least the latests 2 versions just in case.


Deactivate VCS (Version Control System) in PHPStorm

You can enable VCS (Version Control System) in PHPStorm from the VCS menu but, how do you deactivate it?


I didn’t found an option for that anywhere so this is the solution: Remove the .idea/vcs.xml file and restart PHPStorm.

Ref: How to disable version control in phpstorm?

Unserialize strings with special characters in PHP

After several hours having problems with serialized object with spanish texts in it, finally this function I found in worked like a charm:

function mb_unserialize($string) {
    $string = preg_replace_callback(
        function ($matches) {
            if ( isset( $matches[2] ) )
                return 's:'.strlen($matches[2]).':"'.$matches[2].'";';
    return unserialize($string);

For example:


class stdClass#1 (1) {
  public $text =>
  string(12) "áéíóúñ"