open_basedir restriction in effect. File is not within the allowed paths

Home Forums BulletProof Security Pro open_basedir restriction in effect. File is not within the allowed paths

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  AITpro Admin 1 year, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #23011

    Glasairmell
    Participant

    Hi,

    In trouble shooting another problem I came across this when I tested my bps_php_error.log. I have Open BaseDir turned on for all sites.  Any suggestions please = ) ?

    [24-May-2015 20:46:18 UTC] PHP Warning:  copy(): open_basedir restriction in effect. File() is not within the allowed path(s): (/home/xxx/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php55/lib/php/) in /home/xxxx/domains/xxx.com/public_html/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1546

    Cheers!

    #23014

    AITpro Admin
    Keymaster

    The php error message is very clear.  You would need to add the correct path to the open_basedir directive paths. I believe that would be: /home/xxxx/domains/xxx.com/public_html/ but do not quote me on that and check with your web host about that. I do not use open_basedir.

    #23015

    Glasairmell
    Participant

    Since I am the host I will figure it out.  Just wanted to make sure it was not a something I had to set in BPS pro.  Thank you!  Bulletproof-security plugin seems to be looking for files outside the user directory.  Could this be the case?

    #23017

    AITpro Admin
    Keymaster

    Oh ok then I believe the path is this:  /root-path-up-to/your-user-account-name/:  If you are allowing everything within /your-user-account-name/ then that should take care of it. Or if that does work not then use the /full-path-to/public_html/. Nope it is simply that open_basedir just needs to be configured with the correct user account name folder/path.

    #31279

    AITpro Admin
    Keymaster

    Email Question:
    Hi, running with php 7.0.12 now on centos 6.8 without problems. Its an amazing speed boost in compare to php 5.6 🙂
    Only in the BPS error Log i get this warning:

    [BPS Pro htaccess Protected Secure PHP Error Log]
    [29-Oct-2016 08:53:56 UTC] PHP Warning:  copy(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/xxxxx/:/tmp/) in /var/www/vhosts/xxxxx/httpdocs/vz01pro1/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1676
    
    [29-Oct-2016 08:56:05 UTC] PHP Warning:  copy(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/xxxxx/:/tmp/) in /var/www/vhosts/xxxxx/httpdocs/vz01pro1/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1676

    The Open Basedir settings are the same like in php 5.33 and php 5.6. Have you maybe an idea?

    Answer|Solution:
    Yep, we have PHP7 installed on our local development server and it is amazingly fast.  Our host only has up to 5.4 available, but we compensate by doing other things to speed up performance.  😉

    You would just need to add the path to the hosting folder that you want to allow open_basedir to be able to read and write to.
    I believe that would be:  /var/www/vhosts/xxxxx/httpdocs/

    Currently you are only allowing open_basedir in these folders:  (/var/www/vhosts/xxxxx/ and /tmp/ You will need to open and edit your php.ini file and add either that additional path or change the existing path.

    Example: open_basedir = "/var/www/vhosts/xxxxx/:/var/www/vhosts/xxxxx/httpdocs/:/tmp/"

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.