Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to use multiple paths for my php open_basedir config value, in php.ini on a windows server.

The line I'm using is:

open_basedir = E:/Websites;C:/PHP/includes/

Unfortunately, it's ignoring the second entry. Whenever I try to execute code in the C:/PHP/includes directory (this example happens to be PHPUnit), I get

PHP Warning: require(): open_basedir restriction in effect. File(C:\PHP\includes\PHPUnit\PHPUnit-3.6.10\PHPUnit\Autoload.php) is not within the allowed path(s) : (E:/Websites) in C:\PHP\includes\PHPUnit\PHPUnit-3.6.10\phpunit.php on line 41

Note, it's not even showing the second item in the paths list. Can anyone spot where I'm going wrong?

Am I right in thinking that semicolon (;) denotes a comment? If so, how do I separate the entries, as the manual doesn't make it clear

share|improve this question

Don't forget put quotes " around whole path, and AFAIR windows is using different notation? try sth like that: open_basedir = "E:\Websites;C:\PHP\includes"

share|improve this answer
the quotes did it for me on windows server 2012 with php 5.4.14, thanks – Richard Nov 5 '13 at 15:19

I had the same problem.

Just use a simple colon : as a separator, then it works.

Note for clarity: "Under Windows, separate the directories with a semicolon. On all other systems, separate the directories with a colon." (from the php docs)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.