By default, Safe Mode does a UID compare check when
opening files. If you want to relax this to a GID compare,
then turn on safe_mode_gid.
Whether to use UID (FALSE) or
GID (TRUE) checking upon file
access.

UID/GID checks are bypassed when
including files from this directory and its subdirectories (directory
must also be in include_path
or full path must including).

This directive can take a colon (semi-colon on
Windows) separated path in a fashion similar to the
include_path directive,
rather than just a single directory.
The restriction specified is actually a prefix, not a directory name.
This means that "safe_mode_include_dir = /dir/incl" also allows
access to "/dir/include" and
"/dir/incls" if they exist. When you
want to restrict access to only the specified directory, end with a
slash. For example: "safe_mode_include_dir = /dir/incl/"
If the value of this directive is empty, no files with different
UID/GID can be included.

If PHP is used in safe mode, system() and the other
functions executing system programs
refuse to start programs that are not in this directory.
You have to use / as directory separator on all
environments including Windows.

Setting certain environment variables may be a potential security breach.
This directive contains a comma-delimited list of prefixes. In Safe Mode,
the user may only alter environment variables whose names begin with the
prefixes supplied here. By default, users will only be able to set
environment variables that begin with PHP_
(e.g. PHP_FOO=BAR).

Note:

If this directive is empty, PHP will let the user modify ANY
environment variable!

This directive contains a comma-delimited list of environment
variables that the end user won't be able to change using
putenv(). These variables will be protected
even if safe_mode_allowed_env_vars is set to allow to change them.

Warning: SAFE MODE Restriction in effect. The script whose uid is 500 is not
allowed to access /etc/passwd owned by uid 0 in /docroot/script.php on line 2

However, there may be environments where a strict UID
check is not appropriate and a relaxed GID check is
sufficient. This is supported by means of the safe_mode_gid switch. Setting it to
On performs the relaxed GID checking,
setting it to Off (the default) performs
UID checking.

If instead of safe_mode, you set an
open_basedir directory then all
file operations will be limited to files under the specified directory.
For example (Apache httpd.conf example):

If you run the same script.php with this
open_basedir setting
then this is the result:

Warning: open_basedir restriction in effect. File is in wrong directory in
/docroot/script.php on line 2

You can also disable individual functions. Note that the
disable_functions
directive can not be used outside of the php.ini file which means that
you cannot disable functions on a per-virtualhost or per-directory basis
in your httpd.conf file.
If we add this to our php.ini file:

disable_functions = readfile,system

Then we get this output:

Warning: readfile() has been disabled for security reasons in
/docroot/script.php on line 2

bad/missing config values for the Plesk server running the whole thing. I just followed the directions here: https://vb.3dlat.com/

You can configure PHP to have a separate error log file for each VirtualHost definition. The trick is knowing exactly how to set it up, because you can’t touch the configuration directly without breaking Plesk. Every domain name on your (dv) has its own directory in /var/www/vhosts. A typical directory has the following top level directories:

cgi-bin/conf/error_docs/httpdocs/httpsdocs/...and so on

You’ll want to create a vhost.conf file in the domain directory’s conf/ folder with the following lines: