Subject: | suggestion: use mkpath instead of mkdir |
privatedir (https://securityblog.redhat.com/2014/04/09/new-red-hat-enterprise-linux-7-security-feature-privatetmp/) is more common, so creating subdirectories in /tmp can't be done outside of apache's process. mkpath is more resilient if session_dir contains subdirectories.