Solved

php mkdir() function

Posted on 2008-06-19
5
701 Views
Last Modified: 2013-12-13
Hi
mydir() function working fine on linux server, it can create directory

but when i am using this function on windows server, its always saying, permission denied
i have checked the permission its has full permission to read, write and execute
but its always saying: Warning: mkdir() [function.mkdir]: Permission denied in C:\Inetpub\vhosts\domainname\httpdocs\upload\createdir.php on line 4


<?php
$uploaddir = 'upload/';
$mydir = 1;
mkdir("$uploaddir/$mydir", 0777);

?>

am i missing something ?? why its working on linux base server but not windows base server.
0
Comment
Question by:fosiul01
  • 3
  • 2
5 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 21820621
The webserver user on windows does not have the permissions then webserver user must have the permissions or EverOne must have fullcontroll.

linux and windows use different ACL system on the filesystem.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 21820635
ok so what do you advise ?

I am talking about shared web hosting companies web server
like my domain is : www.mydomain.com

and file structure : C:\Inetpub\vhosts\domainname\httpdocs\upload\createdir.php

and i am trying to upload file in upload folder .

by using Ftp account i can create folder, i gave full permission to each and every folder
but still no luck
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 21820663
So you have gave 777 permissions to the folders?
If you are on a shared hosting you might contact their support about that issue.
0
 
LVL 29

Author Comment

by:fosiul01
ID: 21820679
yes, i gave 777 permission to every folder.
ok will speak with web hosting company , see what they tell
0
 
LVL 29

Author Comment

by:fosiul01
ID: 21820736
yes, i gave 777 permission to every folder.
ok will speak with web hosting company , see what they tell
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question