title: LaTeX execution in php and paths problems
body: <p>I am trying to compile a latex source file from php, using <code>exec</code>:</p>
  
  <pre><code>echo shell_exec("/usr/texbin/pdflatex source.tex");
  </code></pre>
  
  <p>Unfortunately, latex <strong>doesn't seem to see all packages</strong> when it is called via php. </p>
  
  <p>For example, I get </p>
  
  <pre><code>LaTeX Error: File `customclass.cls' not found
  </code></pre>
  
  <p>when I try to use <code>customclass</code>, installed in my local <code>texmf</code> folder. There is also the same problem for some packages installed elsewhere.</p>
  
  <p>This has certainly something to do with a path variable or something like that to set up, but I haven't been able to find what for an hour.</p>
  
  <p>Has someone an idea ?</p>