• 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.

Problems with php open_basedir

Status
Not open for further replies.

jiHymas1

New Pleskian
I have a php programme whereby clients subscribe to and download my newsletter. I charge for these newsletters, so I want to keep them inaccessible from external processes. So they're kept in a directory C:\prefletters\

My downloading procedure indicated an error, so I adjusted the php settings inside Plesk, restarted the server and tried again. Same error.

I adjusted the php.ini file indicated by phpinfo() by adding the line:
open_basedir = C:/Inetpub/vhosts/prefinfo.com\;C:\Windows\Temp\;C:\prefletters\
... following which I restarted the server ...

... and I still get the same error as always:

Warning: filesize() [function.filesize]: open_basedir restriction in effect. File(C:\prefletters\prefLetter.pdf) is not within the allowed path(s): (C:/Inetpub/vhosts/prefinfo.com\;C:\Windows\Temp\;C:\prefletters\) in C:\Inetpub\vhosts\prefinfo.com\prefletter\download.php on line 56

******************************

Why is this? How can I modify open_basedir properly?
 
You shouldn't specify open_basedir in php.ini
You should specify it in PHP settings for domain in Plesk GUI. These settings will be stored in registry and used with highest priority than settings from php.ini
 
You should specify it in PHP settings for domain in Plesk GUI.

I did that first, but tried php.ini when I kept getting the same error.

However, it turns out that I had not properly set the security settings on the directory in Windows Server 2012; I corrected them and now everything works fine.

I don't know why the system was reporting a problem with "open_basedir restriction in effect" - that could be a php bug, maybe Plesk, maybe some interaction between PHP and Plesk's virtual hosting. But all's well that ends well.
 
Status
Not open for further replies.
Back
Top