altariamx2003
asked on
Why I cannot delete any files using unlink????
Hi
Im using wampserver to have my local server (localhost), this installation is under windows xp.
Im trying to delete files but no matter what I do I cant do that, allways the page show the error "access denied".
I change the permisions on "C" partition to allow the user everyone to have "Full Control" and the error still happend.
What is missing?? what else I need to do????
Im using wampserver to have my local server (localhost), this installation is under windows xp.
Im trying to delete files but no matter what I do I cant do that, allways the page show the error "access denied".
I change the permisions on "C" partition to allow the user everyone to have "Full Control" and the error still happend.
What is missing?? what else I need to do????
ASKER
I did that but the read-only attribute is still activate no matter what i do in the folders of wamp
for localhost you have give R/W permission on the folder to 'Internet guest acccount'. This account will be shown as IUSER_MACHINENAME
ASKER
IUSER_MACHINENAME???? My computer doesnt have that user
I don use IIE
I don use IIE
you are doing it in localhost? If you have C driver access then from windows explorer you can access the folder and give permission.
ASKER
I had the administrator account but the windows explorer doesnt change the read only attribute
I tried with attrib -r -s c:\path
I tried with attrib -r +s c:\path
I tried using the program "attribute changer"
also I add to my regedit HKEY_LOCAL_MACHINE\SOFTWAR E\MICROSOF T\WINDOWS\ CURRENT VERSION\EXPLORER the key UseSystemForSystemFolders
I tried with attrib -r -s c:\path
I tried with attrib -r +s c:\path
I tried using the program "attribute changer"
also I add to my regedit HKEY_LOCAL_MACHINE\SOFTWAR
Perhaps you are trying to delete a file that is in use?
Please post the unlink code.
ASKER
Im tring to delete a simple file that is not in use
$unlink($path.$file);
$unlink($path.$file);
ASKER
any idea????
what value is there in $path?
it should be a actual path to delete file.
it should be a actual path to delete file.
ASKER
$path has the actual path to delete to the file
ASKER
$path= x:\wamp\www\
ASKER
it doesnt matter which path I use or where is the file located in the installation of my wamp, the read-only attribute no matter what I do, allways remains
did u tried to set the RW permission the folder (not the file). In windows explorer right click on the folder, go to Security tab and add the user that i asked earlier.
ASKER
yes i did that to
the user Everyone has full control, but the problem is not that
look this image:http://www.itssc.edu.mx/image.jpg
as you see, the READ-ONLY attribute no matter what I do remains.
I think that is the problem
the user Everyone has full control, but the problem is not that
look this image:http://www.itssc.edu.mx/image.jpg
as you see, the READ-ONLY attribute no matter what I do remains.
I think that is the problem
ASKER
also no matter where I install the wamp still the read only attribute remains
if it's gray color, the no issue, delete will work.
and for the user, giving rights to Everyone will not work...
u have to give R/W rights to the user group that i asked.
and for the user, giving rights to Everyone will not work...
u have to give R/W rights to the user group that i asked.
from security tab, u have to go Add->Advanced-> Find now...
ASKER
yes it is gray, but what I need to delete??? the wamp directory???????
IUSER_MACHINENAME???? I dont have that user
this are the user that I have in my machine:http://www.itssc.edu.mx/users.jpg
IUSER_MACHINENAME???? I dont have that user
this are the user that I have in my machine:http://www.itssc.edu.mx/users.jpg
ASKER
IUSER_MACHINENAME is I remeber ok, is just If you have installed INTERNET INFORMATION SERVER, and I dont want to use it
u dont have to delete the directory...
gray icon does not mean u cannot delete the file.
in $path try as
$path= wamp/www/
gray icon does not mean u cannot delete the file.
in $path try as
$path= wamp/www/
ASKER
I can use that path on php because is the root directory for my localhost
If you install wampserver, "WAMP/WWW" is the root directory for http://localhost
If you install wampserver, "WAMP/WWW" is the root directory for http://localhost
ASKER
A few moments ago I install the IIS and change the permisions to Everyone to the Internet Guest Account and still when I try to delete any file from my localhost using unlink() the browser says Access denied
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Select the specific folder, not C: that you want to delete files from.
right-click, Click properties, deselect the read-only tick box.
You need to do this for each individual folder, not just the parent folder (C:)