Solved

php mkdir() function

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now