Edit report at https://bugs.php.net/bug.php?id=61114&edit=1
ID: 61114 Comment by: dmptrcks at gmail dot com Reported by: bk2 at me dot com Summary: Bizarre interaction with php.ini not setting include_path Status: No Feedback Type: Bug Package: PHP options/info functions Operating System: *nix PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: found a / right at the start of the file, just before the [PHP] Previous Comments: ------------------------------------------------------------------------ [2013-02-18 16:04:12] bk2 at me dot com Uhm, I did get an email question that amounted to are you kidding me? I answered i was. As far as I know it still happens. The one thing I might add is that it is possible it had a Return character in the disable_functions line. I have found that bug separately, that php.ini parsing errors are not reported even in the php error log. I'd argue that should not be a parsing error, as it is kind of silly to require a possibly very long list to be all on one line. If so, php failed silently, and my other settings, such as open_basedir were set. That is, it did not completely fail to apply the .ini changes. My guess would be that one of the disabled functions was necessary to change the path, but used by the PHP interpreter system directly, as opposed to used during interpretative php source code. I'd further assume that in applying settings from php.ini , the disable_functions directive is actually processed before the include_path directive. Clearly, no function that can be listed in disable_functions should be used by the interpreter, except as a direct call from PHP source. There must be a layer for the php function calls which call a lower layer system call. Otherwise, disabling functions can cause the system to fail in unexpected ways, like this. My guess would be that setting the include path calls one of the directory related functions, such as chdir. I see that the path names are duplicated, I expect that is because my editor turned them into links which were stripped out when i pasted into the bug system. Otherwise, the example below should be reproducible in a couple minutes. ------------------------------------------------------------------------ [2013-02-18 00:35:41] 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 "Open". Thank you. ------------------------------------------------------------------------ [2012-02-16 21:26:55] ras...@php.net Near the top of your phpinfo() output it says: Loaded Configuration File: /path/to/your/php.ini Does that show the right path? ------------------------------------------------------------------------ [2012-02-16 21:24:12] bk2 at me dot com Description: ------------ include_path was not being set as shown by phpinfo.php from php.ini Its stuck at include_path .:/usr/lib/php .:/usr/lib/php <skipping diagnostic saga> If you ALSO change (per below), you lose the ability to alter include_path disable_functions = to disable_functions = (unlink, rmdir, fopen, dio_open, scandir, dir, opendir,chdir, chroot, getcwd, finfo_open, copy, delete, dirname, file_exists, file_get_contents, file_put_contents, file, ftruncate, fwrite, lchgrp, lchown, is_dir, link, mkdir, move_uploaded_file, pathinfo, popen, readfile, readlink, realpath, rename, symlink, tempnam, tmpfile, touch, umask, xdiff_file_bdiff, xdiff_file_diff, xdif_file_merge3, xdiff_file_patch) Test script: --------------- // in php.ini set include_path = /xyz/abc //AND disable_functions = (unlink, rmdir, fopen, dio_open, scandir, dir, opendir,chdir, chroot, getcwd, finfo_open, copy, delete, dirname, file_exists, file_get_contents, file_put_contents, file, ftruncate, fwrite, lchgrp, lchown, is_dir, link, mkdir, move_uploaded_file, pathinfo, popen, readfile, readlink, realpath, rename, symlink, tempnam, tmpfile, touch, umask, xdiff_file_bdiff, xdiff_file_diff, xdif_file_merge3, xdiff_file_patch) Expected result: ---------------- run phpinfo.php it should show include_path /xyz/abc /xyz/abc Actual result: -------------- phpinfo.php Is stuck at include_path .:/usr/lib/php .:/usr/lib/php ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61114&edit=1