Solved

php mkdir() function

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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…
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…
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 …

863 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

20 Experts available now in Live!

Get 1:1 Help Now