Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When showing phpinfo() the sheet show that Apache PATH enviroment variable is very very long and with duplicate entries? Why is that? And how to fix?

/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin

Another server of mine only shows

/sbin:/bin:/usr/sbin:/usr/bin

Both running FreeBSD 8.1, PHP 5.3.6 and Apache 2.2

The one with issues is also running Virtualmin/Webmin.

share|improve this question
add comment

1 Answer

Quite frankly, this isn't a big deal. The PATH variable is actually set by the shell originally, and there are probably a dozen other scripts in Virtualmin/Webmin that append paths to it, i.e.:

PATH=/path1:/path2:$PATH
PATH=/another/path:$PATH

It sounds like there's just been several duplicates added, probably from a lot of overlapping sets. Fortunately, this shouldn't affect much. Variables are cached (by the shell), and I'm assuming PHP will do the same when it tries to eval binaries.

So, unless you're running into issues, its safe to leave it as is.

share|improve this answer
    
I'm having an issue with including a file in PHP, a language file in ZendFramework. The file is allready a whole lot smaller than on another server where the copied website originated. The file included returns an array(), as documented in example #5. But sometimes the include just returns int(1) as documented if there is nothing returned. If I pull random parts out of the returned array, it works. –  Phliplip Jul 11 '11 at 9:30
    
What you're speaking of is not the PATH variable, then. In PHP, there's something called an include_path that handles this. –  Andrew M. Jul 15 '11 at 19:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.