• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

Creating/using a folder outside httpdocs level

W

webguy80

Guest
Hi,

I need to use a web directory *outside* of the document root of httpdocs to use as an include directory for php include files for use in a php application.

I tried using the private directory (there by default), and creating my own directory and assigning the proper permissions etc. Both times I get these types of errors when trying to include inc.config.php from the include directory:

Code:
Warning: main(): open_basedir restriction in effect. File(/var/www/vhosts/domain.com/private/inc.config.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/bookings/index.php on line 2

Warning: main(inc.config.php): failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/bookings/index.php on line 2

Fatal error: main(): Failed opening required 'inc.config.php' (include_path='.:/var/www/vhosts/domain.com/private') in /var/www/vhosts/domain.com/httpdocs/bookings/index.php on line 2

I'm using a .htaccess file to assign the correct include_path using php_value flag, but I know that's not the problem, becuase I can get it to work if I'm including a file from a directory *within* httpdocs . . . any ideas how to solve this?

Many thanks!
 
hiye webguy. did you manage to get this sorted? I'm looking for a similar solution.

Dub
 
Back
Top