1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

PHP accessible directories outside httpdocs

Discussion in 'Plesk for Linux - 8.x and Older' started by ComTech, Feb 22, 2006.

  1. ComTech

    ComTech Guest

    0
     
    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.
     
  2. Highland

    Highland Guest

    0
     
    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.
     
  3. ComTech

    ComTech Guest

    0
     
    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.
     
  4. Highland

    Highland Guest

    0
     
    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).
     
  5. vamosb

    vamosb Guest

    0
     
    Use the following configuration in apache config:

    php_admin_value open_basedir "/tmp:/any_other_path"
     
Loading...