The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

making a directory using php

Discussion in 'General Discussion' started by Markwaugh, Jan 29, 2004.

  1. Markwaugh

    Markwaugh Well-Known Member

    Joined:
    Aug 12, 2003
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sydney, Australia
    Hello,

    When I try to make a directory in my php scripts I get an error.

    eg,
    mkdir("archive", 0700);
    I would receive the message:
    Warning: mkdir(archive/1): No such file or directory in /home/austr/public_html/mail/upload.php on line 76

    How do I grant permission to create directories using php?

    I am trying to make a directory to store a file in. It's not just this script though, mkdir() doesn't seem to work on any scripts I do. Any ideas would be higly appreciated.
     
  2. wonton

    wonton Member

    Joined:
    May 15, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Taiwan
    Check the owner of the directory you want to create under. It must be the same as apache's user/group.
     
Loading...

Share This Page