• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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