title: Tesseract PHP wrapper failed to open file
body: <p>There is a Open source PHP wrapper class for <strong>Tesseract</strong> (<a href="https://github.com/thiagoalessio/tesseract-ocr-for-php" rel="nofollow">https://github.com/thiagoalessio/tesseract-ocr-for-php</a>) but i'm having problems using it: </p>
  
  <p>Installed it successfully with composer, but when I call </p>
  
  <pre><code>$tesseract = new TesseractOCR('img/c11a67cdd171790771fcf33ec78461d9.png');
  $tesseract-&gt;setTempDir('/var/www/dir_name/imgRead/');
  $tesseract-&gt;setWhitelist(range(0,9));
  </code></pre>
  
  <p>When I run <code>echo $tesseract-&gt;recognize();</code> I get</p>
  
  <pre><code>Message: file_get_contents(/var/www/dir_name/imgRead/573534798.txt): 
  failed to open stream: No such file or directory
  </code></pre>
  
  <p>The author says: </p>
  
  <p><strong>IMPORTANT:</strong> Make sure that the tesseract binary is on your $PATH </p>
  
  <p>but i'm not sure what this means exactly, how can I check that the binary is on my $PATH? Anyone use this before?</p>