title: PHP don't create the folder mkdir()
body: <p>I trying create new folder using PHP localhost/PhpProject3/create.php:</p>
  
  <pre><code>&lt;?php mkdir('newdir', 0777); ?&gt;
  </code></pre>
  
  <p>but this code doesn't do it. It also doesn't work :</p>
  
  <pre><code>&lt;?php mkdir('/var/www/PhpProject3/newdir',0777); ?&gt; 
  </code></pre>
  
  <p>I installed LAMP. I think the problem is in the settings (maybe chmod ?) because PHP script works. For example i create simple test.php: </p>
  
  <pre><code>&lt;?php echo 'Great'; ?&gt;
  </code></pre>
  
  <p>and run it: <code>localhost/PhpProject3/test.php</code> the result is Great. </p>
  
  <p>I use Netbeans.
  Here are files: /var/www/PhpProject3 .
  I run it: localhost/PhpProject3/...
  The content of /etc/apache2/sites-available/default:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www
      &lt;Directory /&gt;
          Options FollowSymLinks
          AllowOverride None
      &lt;/Directory&gt;
      &lt;Directory /var/www/&gt;
          Options Indexes FollowSymLinks MultiViews
          AllowOverride None
          Order allow,deny
          allow from all
      &lt;/Directory&gt;
  
      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
      &lt;Directory "/usr/lib/cgi-bin"&gt;
          AllowOverride None
          Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
          Order allow,deny
          Allow from all
      &lt;/Directory&gt;
  
      ErrorLog ${APACHE_LOG_DIR}/error.log
  
      # Possible values include: debug, info, notice, warn, error, crit,
      # alert, emerg.
      LogLevel warn
  
      CustomLog ${APACHE_LOG_DIR}/access.log combined
  
      Alias /doc/ "/usr/share/doc/"
      &lt;Directory "/usr/share/doc/"&gt;
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order deny,allow
          Deny from all
          Allow from 127.0.0.0/255.0.0.0 ::1/128
      &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I also can't create file using touch().</p>
  
  <p>Can anyone help me ?</p>