Textpattern CMS support forum
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 8,493
Create new user can fail if open_basedir is in effect
Not seen this before, presumably peculiar to this particular host of one of my clients. After entering user details at Admin->Users->New Author and clicking Save, I see this twice on the screen:
Warning "file_exists(): open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/var/www/vhosts/domain.com/:/tmp/)" in /var/www/vhosts/domain.com/httpdocs/textpattern/vendors/Textpattern/Password/Random.php at line 81
Should we (can we?) defend against this? Or do I need to petition the host/scour their control panel to see if it’s possible to expand the open_basedir set? I don’t see a neat way round it in code, beyond suppressing errors on the
is_readable() calls, but I don’t like doing that.
EDIT: I should add that the user is still created and the welcome email is sent fine.
EDIT2: The host’s control panel settings for open_basedir only have a choice of three pre-defined options, one of which is “none” so I guess worst case scenario is I turn it off there, but if we can defend against it sensibly in code then I’d still like to pursue it.
Last edited by Bloke (2019-01-09 09:44:26)