@@ 73-77 (lines=5) @@ | ||
70 | $path_parts = pathinfo($strProgram); |
|
71 | } |
|
72 | if (empty($path_parts['dirname']) || ($path_parts['dirname'] == '.')) { |
|
73 | if (PSI_OS == 'WINNT') { |
|
74 | $arrPath = preg_split('/;/', getenv("Path"), -1, PREG_SPLIT_NO_EMPTY); |
|
75 | } else { |
|
76 | $arrPath = preg_split('/:/', getenv("PATH"), -1, PREG_SPLIT_NO_EMPTY); |
|
77 | } |
|
78 | if (defined('PSI_ADD_PATHS') && is_string(PSI_ADD_PATHS)) { |
|
79 | if (preg_match(ARRAY_EXP, PSI_ADD_PATHS)) { |
|
80 | $arrPath = array_merge(eval(PSI_ADD_PATHS), $arrPath); // In this order so $addpaths is before $arrPath when looking for a program |
|
@@ 114-120 (lines=7) @@ | ||
111 | } |
|
112 | ||
113 | // If open_basedir defined, fill the $open_basedir array with authorized paths,. (Not tested when no open_basedir restriction) |
|
114 | if ((bool) ini_get('open_basedir')) { |
|
115 | if (PSI_OS == 'WINNT') { |
|
116 | $open_basedir = preg_split('/;/', ini_get('open_basedir'), -1, PREG_SPLIT_NO_EMPTY); |
|
117 | } else { |
|
118 | $open_basedir = preg_split('/:/', ini_get('open_basedir'), -1, PREG_SPLIT_NO_EMPTY); |
|
119 | } |
|
120 | } |
|
121 | foreach ($arrPath as $strPath) { |
|
122 | // Path with trailing slash |
|
123 | if (PSI_OS == 'WINNT') { |