0

I'm using XAMPP with PHP 5.6.23 in Windows. I'm encountering open_basedir problem. When I run phpunit in command line, I got this.

D:\xampp\htdocs>phpunit --version

Warning: Unknown: open_basedir restriction in effect. File(D:\.bin\phpunit\phpunit.phar) is not within the all
owed path(s): (d:/wt-nmp) in Unknown on line 0
This version of PHPUnit requires PHP 5.6; using the latest version of PHP is highly recommended.

When I run phpdoc in command line, I got this.

D:\xampp\php\pear\phpDocumentor\vendor\bin>phpdoc --version

Warning: include(): open_basedir restriction in effect. File(D:\xampp\php\pear\phpDocumentor\vendor\phpdocumen
tor\phpdocumentor\src\phpDocumentor\Bootstrap.php) is not within the allowed path(s): (d:/wt-nmp) in D:\xampp\
php\pear\phpDocumentor\vendor\phpdocumentor\phpdocumentor\bin\phpdoc on line 19

Warning: include(D:\xampp\php\pear\phpDocumentor\vendor\phpdocumentor\phpdocumentor\src\phpDocumentor\Bootstra
p.php): failed to open stream: Operation not permitted in D:\xampp\php\pear\phpDocumentor\vendor\phpdocumentor
\phpdocumentor\bin\phpdoc on line 19

Warning: include(): Failed opening 'D:\xampp\php\pear\phpDocumentor\vendor\phpdocumentor\phpdocumentor\bin/../
src/phpDocumentor/Bootstrap.php' for inclusion (include_path='.;d:/wt-nmp/include') in D:\xampp\php\pear\phpDo
cumentor\vendor\phpdocumentor\phpdocumentor\bin\phpdoc on line 19

Fatal error: Class 'phpDocumentor\Bootstrap' not found in D:\xampp\php\pear\phpDocumentor\vendor\phpdocumentor
\phpdocumentor\bin\phpdoc on line 21

In php.ini, the setting is

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; http://php.net/open-basedir
; open_basedir = 

I tried to set open_basedir to none, but it does not work.

; http://php.net/open-basedir
open_basedir = none
Sithu
  • 4,752
  • 9
  • 64
  • 110
  • Possible duplicate of [PHP - Failed to open stream : No such file or directory](http://stackoverflow.com/questions/36577020/php-failed-to-open-stream-no-such-file-or-directory) – Vic Seedoubleyew Sep 22 '16 at 07:51
  • See this thread it will help you [link](http://stackoverflow.com/questions/1846882/open-basedir-restriction-in-effect-file-is-not-within-the-allowed-paths) – Rahil Mar 10 '17 at 13:53

0 Answers0