How to set $PATH in PHP?

logic

New Member
I am currently working on my own little project, but I have a little problem: I want to set the $PATH environment variable to \[code\]./bin\[/code\], so that when I use \[code\]exec()\[/code\] and similar functions, it would only search for binary files in that directory (unless I explicitly tell it otherwise).I have already tried \[code\]putenv()\[/code\], which won't work unless I have safe-mode enabled, which I'd prefer not to; and I also tried \[code\]apache_setenv()\[/code\], but that didn't seem to work either.Are there any other solutions I might want to try?(I am using a Linux machine with PHP 5.3.2)
 
Back
Top