Setting up open_basedir

I strongly recommend configuring the open_basedir parameter, which lists directories beyond which PHP scripts cannot traverse, as open_basedir is not specified by default.
If open_basedir is not specified on the web server, then, for example, Path Traversal vulnerabilities can lead to access to all files on the server that have “read by others” permissions, such as /etc/, /var/, and other directories.

Continue reading “Setting up open_basedir”

How to downgrade PHP

Using an example, I will downgrade PHP in Ubuntu 18.04, in which version 7.2 is installed by default. I do not recommend downgrading PHP, since newer versions are more productive and close vulnerabilities, but there are times when you need to run an old script or engine that does not work on newer versions of PHP, and it is very difficult to fix the code due to the fact that there are a lot of files.

Continue reading “How to downgrade PHP”