problem using unlink()

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default problem using unlink()


    Hi,
    I have a problem using unlink(); on a system using FreeBSD and Apache...
    where my local system using Windows and Apache experiences no problems.

    <?
    unlink("test1.php");
    ?>

    On the windows system is deletes the file, but on the FBSD system the file
    does not delete and returns no error. I have tried using the full path, and
    CHMODing the files but no luck. Thanks for any help/advice you can give me.

    James Brash

    James Brash Guest

  2. Similar Questions and Discussions

    1. Unlink and variables
      Hello, I created a form to upload files. The formfield contents are stored as records in an Ascii file "data.dat"; for reasons I am not using a...
    2. Still need unlink help!! God help me. - Revisited
      <20030808202717051099.GyazMail.neuroball@usa.net> <YW50aWdvbmU=.45ab06a65368617cf57750f9f6311818@1060402929.cotse.net>
    3. Still need unlink help!! God help me.
      Still having problem with unlink. My original problem began with deleting files from a list. I seem to have fixed the problem reading the list but...
    4. Help with Unlink please
      > Steve Grazzini wrote at Wed, 06 Aug 2003 23:38:00 -0400: Neither of these worked. I am beginning to think that there is something wrong with...
    5. unlink() in a loop???
      I have a script that allows users to upload pics and enter personal info into Database (not pictures i only store filename in db). The form passes...
  3. #2

    Default Re: [PHP] problem using unlink()

    Hello,

    I'd suggest to have a look at your php.ini and see the value of some
    execute external commands. Don't remember exactly the name of this flag.
    HTH
    Regards
    Pascal Miquet

    Le mar 05/08/2003 à 13:53, James Brash a écrit :
    >
    > Hi,
    > I have a problem using unlink(); on a system using FreeBSD and Apache...
    > where my local system using Windows and Apache experiences no problems.
    >
    > <?
    > unlink("test1.php");
    > ?>
    >
    > On the windows system is deletes the file, but on the FBSD system the file
    > does not delete and returns no error. I have tried using the full path, and
    > CHMODing the files but no luck. Thanks for any help/advice you can give me.
    >
    > James Brash
    >
    >
    > --
    > PHP General Mailing List ([url]http://www.php.net/[/url])
    > To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]
    >
    Pascal Miquet Guest

  4. #3

    Default Re: [PHP] problem using unlink()

    * Thus wrote James Brash (jamesbrash@btinternet.com):
    >
    > Hi,
    > I have a problem using unlink(); on a system using FreeBSD and Apache...
    > where my local system using Windows and Apache experiences no problems.
    >
    > <?
    > unlink("test1.php");
    > ?>
    >
    > On the windows system is deletes the file, but on the FBSD system the file
    > does not delete and returns no error. I have tried using the full path, and
    > CHMODing the files but no luck. Thanks for any help/advice you can give me.
    Make sure your error_reporting flag is turned on to the fullest
    value, I usually apply this in a script to ensure all flags are
    turned on:
    error_reporting(-1);

    Php should output some sort of text that is causing unlink to fail.

    HTH,

    Curt
    --
    "I used to think I was indecisive, but now I'm not so sure."
    Curt Zirzow Guest

  5. #4

    Default Re: [PHP] problem using unlink()

    You need to chmod or chown the directory where the file is located.

    James Brash wrote:
    > Hi,
    > I have a problem using unlink(); on a system using FreeBSD and Apache...
    > where my local system using Windows and Apache experiences no problems.
    >
    > <?
    > unlink("test1.php");
    > ?>
    >
    > On the windows system is deletes the file, but on the FBSD system the file
    > does not delete and returns no error. I have tried using the full path, and
    > CHMODing the files but no luck. Thanks for any help/advice you can give me.
    >
    > James Brash
    >
    >
    Marek Kilimajer Guest

  6. #5

    Default RE: [PHP] problem using unlink()

    thanks for your help, I have already its 777
    >You need to chmod or chown the directory where the file is located.

    James Brash Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139