I have two environments on one server, which are separated via EnvironmenteVariable. That part works like a charm (two FastCGI pools with open_basedir has been set up to ApplicationHost
<application fullPath="C:\path\to\php\php-cgi.exe" arguments="-d open_basedir=C:\path\to\webroot\ENV_DIR">
and related web.config
<add name="php" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\path\to\php\php-cgi.exe|-d open_basedir=C:\path\to\webroot\ENV_DIR" resourceType="Unspecified" requireAccess="Script" />
).
Problem starts with open_basedir restriction for other folder(s) - like \\path\to\network\folder or C:\path\to\webroot\FOLDER (which is outside the environment folder). How to enable the access to these folder(s)?
Have tried:
'... open_basedir="C:\path\to\webroot\ENV_DIR;C:\path\to\webroot\FOLDER"'
Nothing seams to help.
Okay, found a solution. Maybe somebody else needs it as well. Instead of using open_basedir, use doc_root (IIS only, if memory serves, PHP option). Here are examples:
applicationHost.conf file:
<application fullPath="C:\path\to\php\php-cgi.exe" arguments="-d doc_root=C:\path\to\webroot\ENV_DIR">
and related web.config
<add name="php" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\path\to\php\php-cgi.exe|-d doc_root=C:\path\to\webroot\ENV_DIR" resourceType="Unspecified" requireAccess="Script" />
In this way, you are able: