Balderick Posted October 31, 2016 Share Posted October 31, 2016 I'm trying to set chroot. I get the following error message: ( ! ) Fatal error: Call to undefined function chroot() in X:\wamp\www\dir1\dir2\test-getcwd.php on line 5 Call Stack # Time Memory Function Location 1 0.0005 130720 {main}( ) ...\test-getcwd.php:0 my script is like this: <?php echo getcwd() . "\n"; chroot('X:\wamp\www\dir3') . "\n"; echo getcwd() . "\n"; ?> Is it possible chroot is not default set in wamp or am I making a mistake? Link to comment Share on other sites More sharing options...
Ingolme Posted October 31, 2016 Share Posted October 31, 2016 (edited) The first thing I would check is what version of PHP you're running. Edit: It looks like there's a note in the manual http://php.net/chroot This function is only available to GNU and BSD systems, and only when using the CLI, CGI or Embed SAPI. Also, this function requires root privileges. Edited October 31, 2016 by Ingolme Information in the PHP manual Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now