Announcement

Collapse
No announcement yet.

Question about temp files...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about temp files...

    Since my host has enabled Safe Mode for PHP on their server, I have to use a Temp directory when my users upload a file. I have noticed that after they upload a file, the file remains in the temp directory. Because of that, the temp directory is slowly filling up with all sorts of images, Word documents and the likes. Since I think vBulletin stores all uploads in the database, would it be safe to remove the files from the temp directory?

  • #2
    Yes, you can delete those files.

    Although the files should be deleted automatically -- there is an unlink() call in the code.

    Comment


    • #3
      Hmm.... got any clues as to why it's not deleting them automatically then?

      Comment


      • #4
        Not sure off hand -- might be some issue with safe mode. Although it should be producing an error...

        Comment


        • #5
          I do believe it produces an error of some kind when you upload a file... not really since I never actually use the upload function (my users do however). Will check tomorrow, right now I need sleep.

          Comment


          • #6
            Unlink isn't supported on NT, could that be the problem?

            Comment


            • #7
              Ahh, to hell with sleep

              Just checked, it produces no error. Weird.

              Delhaze - it's a UNIX system, so it can't be that. Thanks though.

              Comment


              • #8
                Actually, unlink() works on some of the latest versions of PHP to my knowledge (I believe there's something about it in the change log for PHP 4.0.4).

                But I don't think safe_mode does anything on NT, at least in terms of file uploading -- you should be able to have safe_mode on in NT, but not need to turn on safe_mode uploading.

                Comment


                • #9
                  Originally posted by Ed Sullivan
                  Actually, unlink() works on some of the latest versions of PHP to my knowledge (I believe there's something about it in the change log for PHP 4.0.4).
                  YES, just checked, is indeed working on PHP 4.06

                  Comment


                  • #10
                    Hmm... my host's running PHP 4.0.3pl1. Would that be the problem then?

                    Comment


                    • #11
                      If you're not on NT, you should be fine. I'll take a look into it though.

                      Comment


                      • #12
                        Oddly, it seems to work fine now ever since I've deleted the files from the temp folder.

                        Oh well, as long as it works

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...
                        X