0

I am using Horde_Imap_Client for a custom PHP Webmail and generally it is working fine but some very rare times it throws this error:

file_exists(): open_basedir restriction in effect. File(/usr/data/Horde_Imap_Client/locale) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/:/usr/share/pear)

This is running on a dedicated CentOs Server with Plesk running php 5.4.16.

I have installed Horde_Imap_Client using Pear packages.

So I do not know why does it get a open_basedir error but what I do think is that this error shows up when Horde tries to show another error message.

Maybe it tries to translate an error message that happend and instead it frist goes into this?

I came to this conclusion because if I put in bad IMAP credentials(wrong password) and try to connect I can make this error show up any time.

  • I would like to add that on my local machine if I try a connection with wrong credentials I get "`fwrite() expects parameter 1 to be resource, null given`". Shouldn't this error be handled more properly in Horde? – Alexandru Trandafir Catalin Sep 26 '15 at 12:41

1 Answers1

0

Just customize open_basedir for example.com in PHP settings with

/usr/data/Horde_Imap_Client/{:}/usr/share/pear{:}{WEBSPACEROOT}{/}{:}{TMP}{/}
Oleg Neumyvakin
  • 9,706
  • 3
  • 58
  • 62