title: Failed to open stream: Permission denied using fpdf
body: <p>While using <code>fpdf</code> class in ubuntu linux apache server, I got above warning. Then there is an fatal error:</p>
  
  <blockquote>
    <p>Uncaught exception 'Exception' with message 'FPDF error: Unable to
    create output file: result.pdf' in
    /opt/lampp/htdocs/website/fpdf.php:271 Stack trace: #0
    /opt/lampp/htdocs/website/fpdf.php(1022): FPDF->Error('Unable to
    creat...') #1 /opt/lampp/htdocs/website/generate.php(185):
    FPDF->Output('result.pdf', 'F') #2 {main} thrown in
    /opt/lampp/htdocs/website/fpdf.php on line 271</p>
  </blockquote>