我在Windows中使用XAMPP和PHP 5.6.23。我遇到了open_basedir
问题。当我在命令行中运行phpunit
时,我得到了这个。
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.
当我在命令行中运行phpdoc
时,我得到了这个。
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
在php.ini
中,设置为
; 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 =
我尝试将open_basedir
设置为none
,但它不起作用。
; http://php.net/open-basedir
open_basedir = none