title: php, issue with gd library
body: <p>I'm using lamp on linux, and on a phpinfo I can see that gd is enable.
  this code is working:</p>
  
  <pre><code>&lt;?php
  header ("Content-type: image/png");
  $image = imagecreatefrompng("photo.png");
  imagepng($image);
  ?&gt;
  </code></pre>
  
  <p>but when I'm trying</p>
  
  <pre><code>&lt;?php
  $image = imagecreatefrompng("photo.png");
  imagepng($image, "test.png");
  ?&gt;
  </code></pre>
  
  <p>I have this error message:</p>
  
  <p>Warning: imagepng(test.png): failed to open stream: Permission denied in /opt/lampp/htdocs/gd/mypage.php on line 3</p>
  
  <p>any idea why??</p>