 <p>You say it works if you use the full path to <code>tclsh84.exe</code>. So, a solution might be to find out that full path and use it in your call to <a href="http://php.net/proc_open" rel="nofollow noreferrer">proc_open</a>.</p> <p><br> If you know your <code>tclsh84.exe</code> is in the directory in which your PHP script is, you could use something based on <a href="http://php.net/dirname" rel="nofollow noreferrer"><code>dirname</code></a> and <a href="http://php.net/manual/en/language.constants.predefined.php" rel="nofollow noreferrer"><code>__FILE__</code></a> ; a bit like this, I suppose :</p> <pre><code>$dir = dirname(__FILE__); var_dump($dir); // directory in which the current PHP script is in $path = $dir . DIRECTORY_SEPARATOR . 'tclsh84.exe'; var_dump($path); </code></pre> <p>Considering the PHP script I am using is <code>/home/squale/developpement/tests/temp/temp.php</code>, I would get :</p> <pre><code>string '/home/squale/developpement/tests/temp' (length=37) string '/home/squale/developpement/tests/temp/tclsh84.exe' (length=49) </code></pre> <p>And, if needed, you can use '<code>..</code>' to go up in the directories tree, and, then use directories names to go down.</p> <p><br> Another solution might be to make sure that the program you are trying to execute is in your PATH environment variables -- but if it's a program that's used only by your application, it doesn't make much sense to modify your PATH, I guess...</p>