title: Unable to execute ttf2afm from php
body: <p>I am working on a project that involves PDF API TCPDF. So I needed an area in admin where site admin can upload and install new fonts to be used with TCPDF.
  I am working on a script that does following :
  1) upload TTF font to TCPDF fonts/utils/ directory.
  2) execute <strong>ttf2afm</strong> from PHP script and create .AFM (adobe font metrics) </p>
  
  <pre><code>$command = escapeshellarg("/usr/bin/ttf2afm $fontPath$fontName -o $fontPath$afmName");
  $result = passthru($command);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$command = escapeshellarg("ttf2afm $fontPath$fontName -o $fontPath$afmName");
  $result = passthru($command);
  </code></pre>
  
  <p>3) execute php -f makefont.php font.ttf font.afm and generate the required font.php and font.z files.</p>
  
  <p>now my problem is, the above commands are not executing from web page. If I copy and execute part of this code from php interactive shell it works well. But, from webpage, it simply does not work...</p>
  
  <p>Is there some permission related problem? or I can not execute such commands from a web page?</p>
  
  <p>Thanks in advance</p>