• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

PHP accessible directories outside httpdocs

C

ComTech

Guest
Is it possible to create PHP accessible directories outside httpdocs?

For example, I need to setup a directory to store configuration files that cannot be accessed directly.

Creating a password protected sub directory in httpdocs might work but I would really rather not do it this way.
 
There's a couple of ways to handle this

1. Make your PHP files somewhere on the server and call them via the command line using /usr/bin/php command and then entering the path to your PHP script. This is more useful for Crontab jobs really.

2. Put your files into the tmp directory (it's in the same directory as httpdocs) and call them via include. Files in that directory cannot be accessed via the web server.
 
Does the tmp directory get cleared out systematically? Basically another directory just like tmp is what I would like to create. Typically i name this directory config and store files that get included in my PHP scripts there.
 
Not that I know of. The /tmp directory is provided so that you have a directory outside httpdocs that you can put files in (none of the other directories in the root of your FTP is owned by you, the FTP user).
 
Use the following configuration in apache config:

php_admin_value open_basedir "/tmp:/any_other_path"
 
Back
Top