After the facepalming there is still a lot to say about that.
This blog is running a WordPress, using Ubuntu, Apache and MySQL. So it’s a very basic installation.
I made all this with a tiny Scaleway VM and Ansible. My Goal has been to install this thing without actually having to log into the VM (“Look Mom, no hands!”). Of course, I have been logging into the VM, but that’s mostly for checking things are going well.
It is helpful to remember that containers are just normal Unix processes with two special tricks.
Unix starts processes by performing a fork() system call to create a new child process. The child process still contains the same program as the parent process, so the parent processes program still has control over the child. It usually performs a number of operations within the context of the new child, preparing the environment for the new program, from within.
Then, after the environment is complete, the parent program within the child processes context replaces itself by calling execve(). This system call unloads the current program in a process and reuses the process to load a new program into it.
(In order to be able to give up the test blog at blogspot.nl, I am moving content over)
So you have a new system and want to know what the load limits are. For that you want to run a benchmark.
The main plan looks like this:
You grab a box and find a method to generate load. Eventually the box will be fully loaded and you will notice this somehow.
Microsoft has been doing things to git, they report.
[W]e […] have a handful of teams with repos of unusual size! For example, the Windows codebase has over 3.5 million files and is over 270 GB in size. The Git client was never designed to work with repos with that many files or that much content. You can see that in action when you run “git checkout” and it takes up to 3 hours, or even a simple “git status” takes almost 10 minutes to run. That’s assuming you can get past the “git clone”, which takes 12+ hours.
What Microsoft is doing here is called a Monorepo approach. It not insane, has many advantages and is being discussed at length at Dan Luu, and is also in use with Facebook and Google and in many other places. But git is running into problems handling very large Monoreports, as discussed in an article at Atlassian.
What Microsoft GVFS does, according to their paper, is addressing the issues git has instead of working around them. And that is an awesome thing.
There is Personal Blocklist for Chrome, and that can make Image Search Great Again! Add it, then block Pinterest. And Adblockerblocker news pages.
I am getting my payslips in electronic form, as an encrypted, password protected PDF. It’s not a super secret password, and the encryption is more against accidentally opening the file than it is to keep the content of the file actually secret.
After shipping the PDF home, I am archiving it for tax purposes, but in order to make the archival safe, I am storing the original file as well as the decrypted cleartext version of it. To do that, I wrote a shell script, which contained the password in a variable in clear.
Discussing that at work had a few people rejecting the storage of keys in a script in clear as a matter of principle, and the suggestion was to use the operating system key management service to hold this kind of data.
Here is how to interact with the key management of MacOS.
In mysql() nach PHP 7 retten, Charly Kühnast explains how you can get the deprecated and disabled mysql extension back in PHP 7. You shouldn’t.
There are many reasons for this. One of them being that none of the newer features in MySQL can be used with the old mysql extensions. There is an overview in the PHP documentation that explains exactly what you are missing.
One of the things that you are missing is support for prepared statements. Prepared statements are a mechanism in which you write SQL statements with placeholders for variables, and then later bind values to the placeholders using a “bind” call or as part of the “execute” call which is actually running the statement. In any case, the variables are being escaped properly automatically, making SQL injection a lot harder.
This is not just a problem limited to PHP – a search for bind and execute other sources can be very instructive. For example, the sources of Opennebula or in older versions of Owncloud (up to and including version 7) are rich treasure troves of potential exploits.
So currently the situation is as follows:
There are three extensions at the PHP level, one of which is deprecated and disabled in PHP 7:
The wire protocol of all of these extensions is implemented by a C-level library, against which the extension can be linked. A manual page explains the choices.
What you should be using: These days, your code should not be using the mysql extension. So you will be using mysqli or PDO_mysql, depending on your needs, with the underlying implementation of the native driver doing the heavy lifting.
Do not attempt to port mysql-Extension based code to PHP 7 without refactoring it for prepared statements, please.