Bug #74916 [Com]: include path takes / as being user's home dir

From: Date: Sun, 24 Sep 2017 19:50:43 +0000
Subject: Bug #74916 [Com]: include path takes / as being user's home dir
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211348@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74916&edit=1 ID: 74916 Comment by: spam2 at rhsoft dot net Reported by: jmichae3 at yahoo dot com Summary: include path takes / as being user's home dir Status: No Feedback Type: Bug Package: Unknown/Other Function Operating System: nix PHP Version: 7.1.7 Block user comment: N Private report: N New Comment: > include "/somefile.php"; > how about making it relative to $_SERVER['DOCUMENT_ROOT']? what the hell - a path startign with "/" is a *absolute path* - period if you want a relative path just use one if you want a sbolute path just form it properly Previous Comments: ------------------------------------------------------------------------ [2017-09-24 19:26:25] jmichae3 at yahoo dot com how about making it relative to $_SERVER['DOCUMENT_ROOT']? ------------------------------------------------------------------------ [2017-07-27 15:00:45] spam2 at rhsoft dot net > it's probably centos of which I know nothing since it costs money what are you talking about? don't confuse CentOS with RHEL ------------------------------------------------------------------------ [2017-07-27 14:36:56] jmichae3 at yahoo dot com it's probably centos of which I know nothing since it costs money. ------------------------------------------------------------------------ [2017-07-23 04:22:32] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2017-07-13 05:24:52] requinix@php.net Are you running in a chroot-ed environment? > not the html web directory you put your html files into. It would not do that anyways. /somefile.php will be relative to the root of the filesystem, but if you're in a chroot then "root of the filesystem" will be different from the actual root. > why not a separate command like include_webhome or include_webdir Add four more of those functions? No thank you. Use $_SERVER["DOCUMENT_ROOT"]. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=74916 -- Edit this bug report at https://bugs.php.net/bug.php?id=74916&edit=1

« previous php.bugs (#211348) next »