Solved

php mkdir() function

Posted on 2008-06-19
5
713 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article discusses how to implement server side field validation and display customized error messages to the client.
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.

615 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