Xhprof test error: open_basedirrestrictionineffect

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.