Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

I had the same problem.

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

share|improve this answer
add comment

Your Answer

 
discard

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.