• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Configure open_basedir

T

trogdon

Guest
I;m getting the following errors from the SugarCRM application:

Warning: main() [function.main]: open_basedir restriction in effect. File(/MyCallsDashlet.data.php) is not within the allowed path(s): (/var/www/vhosts/mydomain.com/httpdocs:/tmp) in /var/www/vhosts/mydomain.com/httpdocs/crm/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php on line 29

Warning: main(MyCallsDashlet.data.php) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/mydomain.com/httpdocs/crm/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php on line 29

Fatal error: main() [function.require]: Failed opening required 'MyCallsDashlet.data.php' (include_path='.:') in /var/www/vhosts/mydomain.com/httpdocs/crm/modules/Calls/Dashlets/MyCallsDashlet/MyCallsDashlet.php on line 29

How do I add a open_basedir to the vhost.conf files?

Thanks.
 
Breun,

Thank you very much for your reply. I created the .conf files using the following format:

<Directory /$HTTPD_VHOSTS_D/domain.com/httpdocs>
php_admin_value open_basedir "$HTTPD_VHOSTS_D/domain.com/httpdocs:/tmp:/var/www/vhosts/domain.com/httpdocs/directory"
</Directory>

When I try to execute the command thru SSH I get a message back saying the directory doesn't exist (sorry, I'm new to Linux).

Did I format the path correctly and how do you execute the command?

Thanks again for your time and help.

Bryan :)
 
You'll need to replace /HTTPD_VHOSTS_D with the actual location of your vhosts directory. This is either /home/httpd/vhosts or /var/www/vhosts. You can find out by looking up HTTPD_VHOSTS_D in /etc/psa/psa.conf:

Code:
grep HTTPD_VHOSTS_D /etc/psa/psa.conf

From your error message it appears to be /var/www/vhosts.

Also it shouldn't be necessary to add httpdocs/directory to your open_basedir path as httpdocs is already included and subdirectories of directories included in the open_basedir are also implicitly accessible.

The error seems to be that the script is trying to access a file in / (your filesystem root, not the URL root of your domain). Maybe there's an error in your SugarCRM config? Sorry, I can't help you with that.
 
In the case of Windows do I have to to add

<Directory C:\inetpub\vhosts\domain.com\httpdocs>

php_admin_value open_basedir C:\inetpub\vhosts\domain.com\httpdocs:C:\Windows\Temp:C:\inetpub\vhosts\domain.com\httpdocs\system

</Directory>

or just avoid C: to

<Directory C:\inetpub\vhosts\domain.com\httpdocs>

php_admin_value open_basedir \inetpub\vhosts\domain.com\httpdocs:\Windows\Temp:\inetpub\vhosts\domain.com\httpdocs\bitrix

</Directory>
 
You might want to ask your question in the Windows section of the forums. Or consult the Windows-specific documentation for PHP.
 
Back
Top