Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6739869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:32:20+00:00 2026-05-26T11:32:20+00:00

For security reasons I have put my yii folder below the html root, so

  • 0

For security reasons I have put my yii folder below the html root, so my structure looks like this

/conf
/httpdocs
/httpsdocs
/yii

when running the site I get an error open_basedir restriction in effect that yii.php which is called by index.php out of httpdocs is not in the allowed path. Because this site is a subdomain do I edit the vhosts.conf of the main domain or of the subdomain?

What would the proper setting be to allow

/var/www/vhosts/example.com/subdomains/mysubdomain/yii 

Path to be accessible?


EDIT

So my /var/www/vhosts/example.com/conf/vhost.conf file looks like this now:

AddHandler fcgid-script .php
<Directory /var/www/vhosts/example.com/httpdocs>
php_admin_value open_basedir ".:/var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs:/tmp/:/var/www/vhosts/example.com/subdomains/mysubdomain/yii"
FCGIWrapper /var/www/vhosts/example.com/bin/php-cgi .php
Options +ExecCGI +FollowSymLinks
allow from all
</Directory>

I’ve reconfigured and restarted the web server but I still get the error:

Warning: require_once() [function.require-once]: open_basedir restriction in effect. 
File(/var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs/../yii/yii.php) is not within the allowed path(s): 
(/var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs:/tmp) 
in /var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs/index.php on line 26
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:32:21+00:00Added an answer on May 26, 2026 at 11:32 am

    I found the answer. You have to specify the different modules or else simply editing the vhost file doens’t have much of an effect. This is to turn off the open_basedir but you can edit the settings accordingly.

    <Directory /var/www/vhosts/YOURDOMAIN.COM/subdomains/YOUSUBDOMAIN/httpdocs>
      <IfModule sapi_apache2.c>
      php_admin_value open_basedir none
    </IfModule>
    <IfModule mod_php5.c>
      php_admin_value open_basedir none
      </IfModule>
    </Directory>
    

    then

    # /usr/local/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=YOURDOMAIN.COM
    # apachectl stop
    # apachectl start
    

    Full article can be found here: http://prattski.com/2008/09/13/plesk-open_basedir-fix/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For security reasons (I'm a developer) I do not have command line access to
We have audit columns set by triggers. For obscure security reasons predating my tenure
I have a mysql shell but for security reasons I cannot run the mysqldump
I have a table with a DATETIME column. I would like to SELECT this
I have a SocketServer accepting incoming connections. For security reasons I should only allow
Obviously there are security reasons to close a wireless network and it's not fun
There are many security reasons why one would want to drop an HTTP connection
GWT's serializer has limited java.io.Serializable support, but for security reasons there is a whitelist
i have a Bluehost hosting account, and i manually configure django with this tutorial
my first question is, where do I put this custom extension so that it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.