Link to home
Start Free TrialLog in
Avatar of goliveuk
goliveuk

asked on

Issue with PHP open_basedir on Windows Server

Hello,

We have come across an issue with PHP open_basedir directive - on 3 of our servers (2 Windows Server 2012 R2 and 1 Windows Server 2016) using the directives throws errors 'open_basedir restriction in effect'. Even for files within the path. We have used it before with no issues. We use per site settings for each site so each site has its own open_basedir directive.
A typical setup looks like this:
[PATH=D:/Websites/name_of_website/www/]
open_basedir=D:\Websites\name_of_website\www
error_log=D:\Websites\name_of_website\www\php_log.txt
upload_tmp_dir=D:\Websites\name_of_website\www\tmp
session.save_path=D:\Websites\name_of_website\www\tmp

Only thing that's changing are the paths.

Any suggestions why it's not working?

P.S. the 3 servers are running PHP 5.6.30 and 7.1.1, the issue happens on both versions.
Avatar of David Favor
David Favor
Flag of United States of America image

Make sure none of your files are symlinks or hardlinks pointing outside open_basedir.

Also try posting your domain's VirtualHost config file + the URL of a file throwing the error + the exact error output.
ASKER CERTIFIED SOLUTION
Avatar of goliveuk
goliveuk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of goliveuk
goliveuk

ASKER

We fixed the issue ourselves, without assistance.