• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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