In fact, open_basedir is used to restrict php directory access permissions. if it is not within the permitted range, php cannot access it. This open_basedir can be set in php. ini or in httpd. conf of apache.
We have installed xhprof before, refer to: http://www.php230.com/php-debugging-tools-xhprof.html
However, some errors occur during debugging:
Warning: include(): open_basedir restriction in effect. File(/home/wwwroot/www.test.com_1/xhprof_lib/utils/xhprof_lib.php) is not within the allowed path(s): (/home/wwwroot/www.test.com/:/tmp/) in /home/wwwroot/www.test.com_1/xhprof.php on line 18 Warning: include(/home/wwwroot/www.test.com_1/xhprof_lib/utils/xhprof_lib.php): failed to open stream: Operation not permitted in /home/wwwroot/www.test.com_1/xhprof.php on line 18 Warning: include(): Failed opening '/home/wwwroot/www.test.com_1/xhprof_lib/utils/xhprof_lib.php' for inclusion (include_path='.:') in /home/wwwroot/www.test.com_1/xhprof.php on line 18 Warning: include(): open_basedir restriction in effect. File(/home/wwwroot/www.test.com_1/xhprof_lib/utils/xhprof_runs.php) is not within the allowed path(s): (/home/wwwroot/www.test.com/:/tmp/) in /home/wwwroot/www.test.com_1/xhprof.php on line 19 Warning: include(/home/wwwroot/www.test.com_1/xhprof_lib/utils/xhprof_runs.php): failed to open stream: Operation not permitted in /home/wwwroot/www.test.com_1/xhprof.php on line 19 Warning: include(): Failed opening '/home/wwwroot/www.test.com_1/xhprof_lib/utils/xhprof_runs.php' for inclusion (include_path='.:') in /home/wwwroot/www.test.com_1/xhprof.php on line 19 Fatal error: Class 'XHProfRuns_Default' not found in /home/wwwroot/www.test.com_1/xhprof.php on line 20
From the error code, we can see the word open_basedir restriction in effect, and the problem occurs here.
In fact, open_basedir is used to restrict php directory access permissions. if it is not within the permitted range, php cannot access it. This open_basedir can be set in php. ini or in httpd. conf of apache.
I sent the test code to a window directory mapped to the virtual machine directory, and then stopped the ing relationship. for some reason, this directory has no operation permission. A new test directory is created for testing. everything is OK.