i am trying to rename a file using PHP
i have the script as per below
rename("/home/user/public_html/test.htm",
/home/user/public_html/testOLD.htm");
when i run it i get an error Permission denied in the browser - why is this
??
Thanks in advance 7 17227
"chris" <so*****@here.com> wrote in message
news:3f********@funnel.arach.net.au... i am trying to rename a file using PHP i have the script as per below
rename("/home/user/public_html/test.htm", /home/user/public_html/testOLD.htm");
when i run it i get an error Permission denied in the browser - why is
this ??
Thanks in advance
Using FTP, CHMOD the file to 777.
--
Sharif Tanvir Karim http://www.onlyonxbox.net
"Sharif Tanvir Karim" <sh****@nyc.rr.com> wrote in message
news:eq********************@twister.nyc.rr.com... "chris" <so*****@here.com> wrote in message news:3f********@funnel.arach.net.au... i am trying to rename a file using PHP i have the script as per below
rename("/home/user/public_html/test.htm", /home/user/public_html/testOLD.htm");
when i run it i get an error Permission denied in the browser - why is this ??
Thanks in advance
Using FTP, CHMOD the file to 777.
is there a way in php to chmod??
-- Sharif Tanvir Karim http://www.onlyonxbox.net
i have tried chmod() function in PHP
NOW i get an error
Operation not permitted
"Sharif Tanvir Karim" <sh****@nyc.rr.com> wrote in message
news:eq********************@twister.nyc.rr.com... "chris" <so*****@here.com> wrote in message news:3f********@funnel.arach.net.au... i am trying to rename a file using PHP i have the script as per below
rename("/home/user/public_html/test.htm", /home/user/public_html/testOLD.htm");
when i run it i get an error Permission denied in the browser - why is this ??
Thanks in advance
Using FTP, CHMOD the file to 777.
-- Sharif Tanvir Karim http://www.onlyonxbox.net
chris wrote: "Sharif Tanvir Karim" <sh****@nyc.rr.com> wrote in message news:eq********************@twister.nyc.rr.com... Using FTP, CHMOD the file to 777.
is there a way in php to chmod??
Yes, but php must be the owner of the file. In this case php won't be
the owner so it won't work, you'll just get another similar error
message. You need to use ftp to make this change.
"kicken" <sl***@aoeex.com> wrote in message
news:pXOvb.205026$mZ5.1533427@attbi_s54... chris wrote: "Sharif Tanvir Karim" <sh****@nyc.rr.com> wrote in message news:eq********************@twister.nyc.rr.com... Using FTP, CHMOD the file to 777.
is there a way in php to chmod??
Yes, but php must be the owner of the file. In this case php won't be the owner so it won't work, you'll just get another similar error message. You need to use ftp to make this change.
how can i MAKE php the owner of the file - is this possible??
i have full server access BTW
chris wrote: how can i MAKE php the owner of the file - is this possible??
i have full server access BTW
I think (but im not sure about that) you have to set the group/owner to
apache (if you are using an apache), more detailed: You have to set the
group and/or owner rights to your http-server, because this is the
service that accesses the file.
Certainly your files have the rights of your user account, but your
Web-Server is another "user" in another group.
Hope this helped,
Greetings, Till.
"chris" <so*****@here.com> wrote in message
news:3f********@funnel.arach.net.au... i have tried chmod() function in PHP
NOW i get an error Operation not permitted
"Sharif Tanvir Karim" <sh****@nyc.rr.com> wrote in message news:eq********************@twister.nyc.rr.com... "chris" <so*****@here.com> wrote in message news:3f********@funnel.arach.net.au... i am trying to rename a file using PHP i have the script as per below
rename("/home/user/public_html/test.htm", /home/user/public_html/testOLD.htm");
when i run it i get an error Permission denied in the browser - why is this ??
Thanks in advance
Using FTP, CHMOD the file to 777.
-- Sharif Tanvir Karim http://www.onlyonxbox.net
Chris,
CHMOD the file through an FTP program.
--
Sharif Tanvir Karim http://www.onlyonxbox.net This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: JaazzMan |
last post by:
Hi! I wrote this script and executed on my server, with php 4.1.2
<?php
$fp = fopen('test.txt', 'w');
fwrite($fp, "Bla bla");
fclose($fp);
?>
it returns this message:
|
by: Bob Bedford |
last post by:
I've tried everything seen on Internet, but nothing works:
I'm trying to move a file from a dir to a subdir (WinXP Pro, Apache, PHP
4.3.3)
Here is the code:
chmod($XMLPath, 0777);...
|
by: Stéphane Ninin |
last post by:
Hello world,
I am fighting with what is probably a stupid problem.
In a wxpython GUI, here is a method which must read a file,
and if the file is not correctly formed rename it and create a...
|
by: Taishi |
last post by:
New user of SQL
Everything is on the same machine
My error is close to the bottom
After reading it today, I can see there is a problem with 2 dbases
'PUBS' and 'Master'
There are also some...
|
by: Russell Warren |
last post by:
I've been having a hard time tracking down a very intermittent problem
where I get a "permission denied" error when trying to rename a file to
something that has just been deleted (on win32).
...
|
by: debug03 |
last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
|
by: Elfinster |
last post by:
Someone suggested I post this here. Nobody in the ASP forums had an answer
I'm getting this error while trying to rename a file on my webserver
Microsoft VBScript runtime error '800a0046'
...
|
by: private.anders |
last post by:
Hi David!
Really need assistance since I have been struggling with a problem
long time now.
I am running a web application on a Win 2003 Std (Active Directory).
Everything works fine. I have...
|
by: private.anders |
last post by:
Really need your assistance since I have been struggling with a
problem long time now.
I am running a web application on a Win 2003 Std (Active Directory).
Everything works fine. I have...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |