Improve open_basedir restriction warning
Description
An open_basedir restriction may be in effect, disallowing e.g. file_exists() on certain directories. The warning that PHP generates in such cases lists all allowed paths, and states that the non-allowed path is not within the allowed paths. This is all good, but it should also say which specific file specifies what paths are allowed. Many systems are full of .conf and .ini files, and it can be an incredible pain to figure out where exactly all those paths that are allowed are set.
I'm not sure PHP even stores that level of information.
No offense but is this an issue that needs to be solved by PHP itself? You really have so many settings files that you don't know where settings are? Because that sounds like a system configuration problem of spreading things out across too many files... For example, in a typical Ubuntu setup, there are maybe two or three files for general settings, and either you put your changed settings into one of those or you set up a new file in the magic conf.d/ directory.
I'm not sure PHP even stores that level of information.
No, it does not. PHP could store all the places (it's not only about files, but also about command line options, and on Windows also the registry), but that would increase the memory usage for a doubtful gain. If you still want that to happen, please pursue the RFC process.
Hi, my reasoning is that if PHP knows all the paths, whatever provides this information to PHP could also pass along which files these paths were taken from. If this is either not the case, or the modular nature of open source projects communicating with each other makes it difficult for PHP to get this information as it requires another team to make software changes, I guess there's not much we can all do. I will close this issue.