Unable to mkdir() in up level directory
Posted on 2006-11-23
Hello, I'm running Plesk/Apache/PHP4 server. A website in the following directory:
/var/www/vhosts/mysite.com/httpdocs <- this is the root directory of mysite.com. I uploaded the following php script to the site:
And then access it from mysite.com/mkdir.php. But it doesn't work. I got FALSE! The abc directory was not created.
1. The mode of /var/www/vhosts/mysite.com/test directory is 777
2. The user running PHP is "apache"
3. The PHP safe_mode = false
4. I tried to change user of /var/www/vhosts/mysite.com/test directory into apache or even nobody, still doesn't work.
5. There is no problem if I create directory under httpdocs directory. For example, I create a directory named "inside" via FTP: /var/www/vhosts/mysite.com/httpdocs/inside and than set its mode into 777. When I use mkdir('/var/www/vhosts/mysite.com/httpdocs/inside/abc') to create directory, it works.
Why it just doesn't work outside the httpdocs directory?