56 users online (0 members and 56 guests)  


  Results 1 to 4 of 4

Related

  1. Not working in IE    Forum: HTML Forum
    Replies: 2
  2. PHP form- not working    Forum: PHP Forum
    Replies: 12
  3. Why isn't this working?    Forum: HTML Forum
    Replies: 5
  4. It's 3:00 AM here and I'm working the .....    Forum: General Discussion
    Replies: 47
  5. Background not working    Forum: HTML Forum
    Replies: 2
  1. #1
    clem_c_rock's Avatar
    New User

    Status
    Offline
    Join Date
    May 2006
    Posts
    4

    unlink not working

    This is rather strange - I have a function that creates a temperary file in a directory and then a file that deletes the temperary file.

    They both use the base path of:

    D:/Websites/website_com/test/perl_scripts/test/temp/temp_dir/

    and the file name would be appended to that path.

    The permissions are set to 777 so it should be able to be deleted by the unlink function like this:

    unless( unlink( $file_to_be_deleted ) ){ print "<p><b>file could not be deleted!</b>"; }

    I always get the error message that the file could not be deleted when I run the unlink function.

    any ideas?

    Thanks,
    Clem

  2. #2
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: unlink not working

    change this part too:

    print "<p><b>file could not be deleted: $!</b>";

    that should throw the actual error,
    -ALL

  3. #3
    clem_c_rock's Avatar
    New User

    Status
    Offline
    Join Date
    May 2006
    Posts
    4

    Re: unlink not working

    Well - looks like the problem is that I'm developing on a Windows 2003 server so I can't change the permissions of the file after I upload it so then I can't delete the file because I don't have the permissions.

    Anyone know a workaround?

  4. #4
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: unlink not working

    not true... windows does use a permission system, but it is not the same as *nix does...

    Windows does it by users... there are a few special users like Guest and Everyone which allows every user to edit it... just like 777... but you cannot do it though ftp. I would contact your host and ask them what's up,
    -ALL



Tags for this Thread