Solved

php mkdir() function

Posted on 2008-06-19
5
706 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

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…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

726 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