Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mkdir command

Status
Not open for further replies.

alsaffar

Programmer
Joined
Oct 25, 2001
Messages
165
Location
KW
Hi there,

I can't execute "mkdir" command in a PHP script!

Although I set "write" persmission to the dorectory I want to create sub directories under it, but still everytime I got the same error "Permission Denied".

One more thing, under "localhost" the "mode" is not necessary for "mkdir" command, but in "remote server" it asks for the mode!

1- what is mode necessary for "mkdir"?

2- Please guide me to run the "mkdir" successfully.

3- How dangerous its the "mkdir" command for "Other"?

Pleae help me.
 
Did I say that I used a hostname woth PHP's mkdir() function!
 
Then can you explain this sentence, please:

One more thing, under "localhost" the "mode" is not necessary for "mkdir" command, but in "remote server" it asks for the mode!

Want the best answers? Ask the best questions: TANSTAAFL!!
 
:) while developing the script in my PC under localhost service (127.0.0.1), mkdir() didn't asked for a mode! but after uploading the PHP script to a remote server (mydomain.com) it gave me an error that the mode is missing!

hope Im clear this time :)
 
So, any sugeestion to help overcome my problem!? :)
 
To be honest, the last time I had to do something with PHP's mkdir() function, it gave me sufficient problems that I resorted to using an external mkdir command.

You've verified that the directory is created? And that the ownership of the directory is what you expect?

Want the best answers? Ask the best questions: TANSTAAFL!!
 
This may be a Web Host thing if that's where your remote server is located(hosted). I know that certain web hosts will disable PHP commands that deal with the file system - like u can't set/unset the read/write permissions of files and directories using PHP at the web host I use. The mkdir() may also be a part of this.

As far as the mode goes u would need read/write permission for all and at least for WORLD so try setting the directories your trying to run the mkdir() in to 777 just to test it out.

Rocco is the BOY!!

SHUT YOUR LIPS...
ROCCOsm.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top