Category Archives: Software

Fix “There is no suitable CSPRNG installed on your system” in Plesk

After updating paragonie/random_compat you may get this error. This is caused because version 2.0 stopped using OpenSSL and now it uses /dev/urandom which may not be readable by your PHP configuration. This is fixed adding /dev/urandom to your open_base configuration in “Websites & Domains -> PHP Settings -> open_basedir”:

plesk-open_basedir-dev-urandom

Ref: http://forum.odin.com/threads/how-to-change-php-open_basedir-in-plesk-10-4-4.259102/
https://forum.owncloud.org/viewtopic.php?t=34286
https://github.com/paragonie/random_compat/issues/99

Adding PHP 7.0 support in Plesk

First thing you need to do is update to Plesk 12.5 (currently 12.5.30). For that you have to go to Server options, “Plesk->Updates and Upgrades” and then go to “Install or Upgrade Product”. You may get some warnings in case you installed third party modules so you should better remove them (it happended to me with mod_security) before doing the upgrade. As you can see I’ve already updated to 12.5.30 so I can’t show you the proper image but the options are just the same.

upgrade_plesk_product

Once you have Plesk updated the actual magic, in Linux systems, is done with this command (runned as root):

# plesk sbin autoinstaller --select-product-id plesk --select-release-current --install-component php7.0

Full PHP 7.0 install process log: http://pastebin.com/UjH9g4Ak

The nice thing about it is that you can just change the PHP version number to install another one, for example if you have a domain with an app that needs to run in a legacy PHP 5.2 version:

# plesk sbin autoinstaller --select-product-id plesk --select-release-current --install-component php5.2

Now you can select an specific PHP version for different domains by just setting it in the “PHP Settings” option. Before:

php_before

Changing the PHP version to 7.0:

php_70_change

After:

php_after

Ref: https://kb.odin.com/en/127701
https://kb.odin.com/en/125146

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 http://20141204-09h35m01s.parallels.mirrors.ovh.net.snapmirror.vps.ovh.net/parallels/products.inf3: The requested URL returned error: 404 Can't process versions.inf3: Failed to download the package http://20141204-09h35m01s.parallels.mirrors.ovh.net.snapmirror.vps.ovh.net/parallels/versions.inf3: 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.”.

Plesk-updates-source-and-installation-settings

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 (http://parallels.mirrors.ovh.net/parallels/) and click “Save”. It worked!

Plesk-updates-source-and-installation-settings-before

Plesk-updates-source-and-installation-settings-after

Ref: http://forum.odin.com/threads/where-is-the-parallels-installer-configuration-file.329704/#post-782253

Fix “VBoxManage: error: Cannot register the hard disk … because a hard disk … already exists”

If you get an error like this when running a vboxmanage command:

VBoxManage: error: Cannot register the hard disk 'disk.vdi' {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} because a hard disk 'disk.vdi' with UUID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} already exists

You can change the UUID of the hard disk:

vboxmanage internalcommands sethduuid disk.vdi

Or you may bypass it by using the given UUID instead of the hard disk vdi file. For example:

vboxmanage modifyhd {6bc03a41-794b-4a84-adaf-789436919417} --compact

Note: vboxmanage is for GNU/Linux and Windows, in Mac OS X it’s VBoxManage.

virtualbox_logo

Ref: http://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size

Compile ffmpeg with libfdk_aac support: encoding AAC with ffmpeg

I wanted to add libfdk_aac support to ffmpeg because the documentation says it’s the best quality option for AAC encoding.

ffmpeg-logo

The problem was that when I tried to configure ffmpeg with libfdk_aac using the “–enable-libfdk-aac” flag it gave me this error:

Unknown option "--enable-libfdk-aac".
See ./configure --help for available options.

I was compiling the what I thought it was latest ffmpeg version (0.11.5) available from the releases site and that was a huge mistake: the last release is 2.3.3 and ffmpeg is now using git. So I cloned the repository and then the “–enable-libfdk-aac” flag worked fine:

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

If you want to be sure ffmpeg will have support for libfdk_aac look for this line inside the “Enabled encoders” section when you run the configure command:

a64multi5          libfdk_aac         prores