473,396 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

mkdir issue with Windows Server 2003

Hello,

I have run into a problem using the mkdir function on a windows 03 server running IIS v6 with PHP 5.0. I am trying to simply create a folder within my site. Safe Mode is set to "off" and the "everyone" group has full-control of the "data" folder and subfolders. My script is as follows:

<?php
if(mkdir("/site_root/data/test"))
echo "TRUE";
else
echo "FALSE";
?>

Always outputs "false", and of course the folder is not created....Please help!
Feb 5 '08 #1
4 3149
code green
1,726 Expert 1GB
Is Program Files part of the path name?
Some PHP functions don't like spaces in directory names.
Some also prefer the full path name.
If the directory already exists Windows will deny mkdir, but not sure what is returned.
A better test is to use mkdir without an if() then use
[PHP]if(file_exists($dirname))[/PHP]
Feb 6 '08 #2
Thanks for your reply. However, I do not know what the parent directory of site_root is. I think it might have something to do with permissions though. The company hosting my site has set the everyone group with full control of the folder i am trying to add the directory, however i think they have done this with active directory. By granting permissions this way, would this also grant access it to allow the user that the script runs under to create directories? BTW what user would that be? Or, would this need to be set in th IIS manager? Thanks again for your help!!
Feb 8 '08 #3
Thanks for your reply. However, I do not know what the parent directory of site_root is. I think it might have something to do with permissions though. The company hosting my site has set the everyone group with full control of the folder i am trying to add the directory, however i think they have done this with active directory. By granting permissions this way, would this also grant access it to allow the user that the script runs under to create directories? BTW what user would that be? Or, would this need to be set in th IIS manager? Thanks again for your help!!
I have had this problem too but I could not find any solution. I always had asked this question that if a script is trying to output a file or directory what user would that be? So, that I can give that user permissions etc to do this.

Somehow my script has started working fine and I feel that if you set the particular directory settings to all permissions then it gets better.

Also, please note that I had to put the complete URL that is from C:\xxx\ggg\ etc
Feb 8 '08 #4
nomad
664 Expert 512MB
I have had this problem too but I could not find any solution. I always had asked this question that if a script is trying to output a file or directory what user would that be? So, that I can give that user permissions etc to do this.

Somehow my script has started working fine and I feel that if you set the particular directory settings to all permissions then it gets better.

Also, please note that I had to put the complete URL that is from C:\xxx\ggg\ etc
bing go:
C:\xxx\ggg\ etc

nomad
Feb 8 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Chris | last post by:
I have yet to understand or get a response on the issue I'm having. I'm taking an asp web application and migrating it from Windows 2K to 2003. I have the new website location (2003) settings...
8
by: Sue | last post by:
AccessXP in Access2000 Mode: In my code I use the MkDir method to create a folder and then I want to use the transfertext method to create a delimited text file in that folder. MkDir runs and...
0
by: Nick Palmer | last post by:
Hi all, I've got what I think is a security/permission issue related to using the OWC 11 components on a Windows 2003 server running IIS 6.0. My web app has a client side Excel grid, and it...
17
by: 57R4N63R | last post by:
I'm currently building a website for one of the client. There has been few errors here and there, but just recently the problem is getting worse. Basically the symptoms is that when the user try...
0
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". ...
0
by: nhaughton | last post by:
I have writtten a webservice in .Net 1.1 using C#, that exposes an existing COM+ application as a webservice to remote web applications. The COM+ application works fine under Win 2000, XP amd...
30
by: MikeC | last post by:
Good People, I'm writing a backup utility that uses a chdir() to go into the source directory (in which the files reside that I want to back up), so I don't want to use chdir() to get into the...
1
by: B | last post by:
Hi, I am using mkdir to create a directory and upload files to it. Unfortunately the folder is accessible via the url to any user, which is creating problems. How can I manage permissions with...
2
by: _q_u_a_m_i_s's | last post by:
Hy, i encountered a weird problem on a server running php5, and apache. Seems like i cannot create folders that end with "/". for example: mkdir("test/") will fail mkdir("test") will work Is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.