Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. wonton

    wonton Member

    Joined:
    May 15, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    151
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice