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_include directory outside the httpdocs directory

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by JamieA, Mar 18, 2011.

  1. JamieA

    JamieA Guest

    0
     
    I would like to establish a way to create a separate folder for php_include files, which exists outside of the httpdocs directory.
    For security reasons, i am keen to do this on an on demand pre-domain basis.

    I have managed to create a dedicated php-include folder for the domain, and chown/chmod appropriately so it has the same owner/permissions as the httpdocs directory.
    The folder exists at: /var/www/vhosts/[domain]/php_include

    I have created and edited a vhosts.conf file for the domain, and enabled the directory as the php include path using the php_value include_path ".:/ ... " directive.
    This can be seen via phpinfo() to be correct.

    Sadly though, i do not seem to be able to include any files stored in this directory, and am at a loss about what to do next.

    Any suggestions would be gratefully received!
     
  2. Kev

    Kev Guest

    0
     
    To try isolate what's going wrong:
    1) whats the php error received when the include doesn't work?
    2) I assume you're trying to include via a relative path because setting the include_path thus do the includes work if you include them via the full path e.g. include '/var/www/vhosts/[domain]/php_include/[your_file] ?
     
Loading...