• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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