473,320 Members | 1,814 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,320 software developers and data experts.

rename a file in Windows XP server using php script

12
I am trying to rename a file in Windows XP server using the following php script but i am getting "Permission denied".

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. rename("file1.php", "file2.php");
  3. ?>
[Please use CODE tags when posting source code. Thanks! --pbmods]

Pls help.
Jun 6 '07 #1
8 3199
jx2
228 100+
I am trying to rename a file in Windows XP server using the following php script but i am getting "Permission denied".

<?php
rename("file1.php", "file2.php");
?>

Pls help.
make sure file1.php its not "read only"
Jun 6 '07 #2
nasse
12
make sure file1.php its not "read only"
It has full previllage set. I think it has to do with windows xp. I read at http://www.php.net/manual/en/function.rename.php and some one is saying the same.
Jun 6 '07 #3
jx2
228 100+
It has full previllage set. I think it has to do with windows xp. I read at http://www.php.net/manual/en/function.rename.php and some one is saying the same.
i run php on windows XP with apache i just try it and it works well - did you log in as an owner?
Jun 6 '07 #4
nasse
12
i run php on windows XP with apache i just try it and it works well - did you log in as an owner?
Oh no, I am trying to run the script as a web user. I am also running windows IIS.
Jun 6 '07 #5
jx2
228 100+
Oh no, I am trying to run the script as a web user. I am also running windows IIS.
i didnt ment that lol :-)
how did you start computer? is server running/started as an owner of computer with all privileges?

:-)
Jun 6 '07 #6
nasse
12
i didnt ment that lol :-)
how did you start computer? is server running/started as an owner of computer with all privileges?

:-)
Oh sorry about that. Yes as a root user.
Jun 6 '07 #7
jx2
228 100+
well :-) then i wish u luck :-)
u can allways instal apache server :-)
Jun 6 '07 #8
pbmods
5,821 Expert 4TB
Does the folder in which you are operating also have write privileges for the web server User?
Jun 6 '07 #9

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

Similar topics

2
by: N. Schultheiss | last post by:
I'm new at this and wonder if this is possible. I'm running a Win2k server with FP 2002 Extensions using discussion boards. There is a time delay in the posted content and the way our moderators...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
10
by: robwharram | last post by:
Hi, I'm quite frustrated in the fact that I can't even display a simple "Hello World" message on .Net. I've been through all of the groups and searched all over the place and haven't been able...
2
by: Bruce Russell | last post by:
This may sound stupid but I can't rename the WebForm1.aspx in the solution explorer. The file is located in my local web server at C:\Inetpub\wwwroot\Lab3-VB-Starter\WebForm1.aspx Is there...
5
by: Rothariger | last post by:
Hello.... i want to know if its posible to rename multiple files like windows does.. example: file zzzzzzz.doc file asdasd.doc file esfsefse.doc
10
by: Don Curtis | last post by:
I have a C# client app that sometimes needs to do thousands of specialized file renames of files on a file server in the same domain. If the files reside locally on the client machine, the renames...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: hardik | last post by:
can anyone tell me how i can change the filename which is going to uploaded here is a code for uploading a file <!-- #include file="clsUpload.asp" --> Set objUpload = New clsUpload If...
1
by: achotto | last post by:
hi, i try to upload a multiple image files. after that i will rename the files name. the problem is when i upload a 2 or more same files name exp-goal.jpg, it will return "files already exist". ok...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.