Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    File Manager package (Tom Schaefer) errors

    Scheduled Pinned Locked Moved pfSense Packages
    15 Posts 3 Posters 11.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sully
      last edited by

      Hi. I searched for this answer, but failed to find it.

      I have installed the File Manager package made by Tom Schaefer on multiple PFSense v123 installs. Every time, it fails to download a file. In my case, I am trying to download the block.log file for squidguard. I know I can open it with the edit file tool, providing I input the path. However, I like the interface of FileManager, but don't know why it fails.

      When I click the download icon, instead of downloding the file, the browser address bar displays this
      http://192.168.1.1/packages/filemgr/rbfminc/download.php?p=%2Fvar%2FsquidGuard%2Flog%2F&file_name=block.log
      displaying only a blank page.

      This happens from IE, Chrome and Firefox in win7 ultimate. Happens across all machines in the house, differering versions of same browsers. I examined the scripts, but honestly don't know know enough about .php to know how to fix it.

      Does anyone else experience this, and is there a fix for it?

      Oh, I did install the phpservice package, not knowing if that was a dependency or not.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        It looks like a php memory limit error.

        Try to compress or split the file before trying to download it.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • S
          sully
          last edited by

          Hmm. I don't think it is that. This is a fresh install of pfsense, there were only about 50 or so entries, file size was pretty small. I went ahead and edited the file to contain 5 lines of text, still no love.

          Any other thoughts? It must be working in others installs, correct? I have tried it also with a fresh install and the file manager being the only package installed. I just find it baffling that it seems to not work in a default install.

          1 Reply Last reply Reply Quote 0
          • M
            mdima
            last edited by

            Hi,
              there was an authentication issue in the download function, I fixed it using the pfSense standard functions to determine if the request comes from an authenticated session or not.

            Also, I changed some of the code. I used the PHP function "readfile" to upload the file to the client in order to avoid to preload the content of the file in a string variable and have possible memory issues (the "readfile" should use a stream to send the file in the output buffer, so no memory issues).

            If you reinstall the package you should apply the fix.

            Ciao,
            Michele

            1 Reply Last reply Reply Quote 0
            • S
              sully
              last edited by

              Awesome. I did uninstall the package, then installed it again. This is what I get when I open a file with only this text "log test text"

              Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/head.inc:20) in /usr/local/www/packages/filemgr/rbfminc/download.php on line 16 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/head.inc:20) in /usr/local/www/packages/filemgr/rbfminc/download.php on line 17 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/head.inc:20) in /usr/local/www/packages/filemgr/rbfminc/download.php on line 18 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/head.inc:20) in /usr/local/www/packages/filemgr/rbfminc/download.php on line 19 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/head.inc:20) in /usr/local/www/packages/filemgr/rbfminc/download.php on line 20 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/head.inc:20) in /usr/local/www/packages/filemgr/rbfminc/download.php on line 21 log test text
              

              The download button now does something, although it is not actually downloading, but showing the above syntax in the browser window.

              I greatly appreciate the effort put forth. Hopefully this helps to solve the issue.

              Also, sorry the code box is so long. I left the formatting the way it was originally. If there is some other way to get a vertical scroll other than adding crlf's, I don't know how to do it.

              1 Reply Last reply Reply Quote 0
              • M
                mdima
                last edited by

                Hi Sully,
                    mmmhhh… I tested it with Firefox and IE... which browser are you using? Which version of pfSense?

                Thanks,
                Michele

                1 Reply Last reply Reply Quote 0
                • M
                  mdima
                  last edited by

                  Hi Sully,
                    please try again to reinstall the package…

                  I also worked a bit on the caching to avoid the files getting cached from the browsers.

                  Ciao,
                  Michele

                  1 Reply Last reply Reply Quote 0
                  • S
                    sully
                    last edited by

                    I am using chrome (latest) and also chromium (latest). Sorry, I should have included that.

                    I am using the i386 v123 on an old 800mhz celeron.

                    I am at work, but will try that again tonight when I get home and report back.

                    I cannot thank you enough for your efforts. It is much appreciated, even if this isn't a mission critical package.

                    1 Reply Last reply Reply Quote 0
                    • S
                      sully
                      last edited by

                      I apologize if I am being problematic. I deleted it, then reinstalled it, but got this error when attempting to download that log file.

                      Fatal error: Call to undefined function: session_auth() in /usr/local/www/packages/filemgr/rbfminc/download.php on line 14
                      

                      I am not using HTTPS to access the box inside my lan, if that makes any difference.

                      1 Reply Last reply Reply Quote 0
                      • M
                        mdima
                        last edited by

                        @sully:

                        I apologize if I am being problematic. I deleted it, then reinstalled it, but got this error when attempting to download that log file.

                        Fatal error: Call to undefined function: session_auth() in /usr/local/www/packages/filemgr/rbfminc/download.php on line 14
                        

                        I am not using HTTPS to access the box inside my lan, if that makes any difference.

                        Hi Sully,
                          I think this is due to the difference between pfSense 2.0 and 1.2.3 (the missing function is in an include file).

                        Have you considered upgrading to 2.0? It really worth it…

                        1 Reply Last reply Reply Quote 0
                        • S
                          sully
                          last edited by

                          @mdima:

                          Hi Sully,
                             I think this is due to the difference between pfSense 2.0 and 1.2.3 (the missing function is in an include file).

                          Have you considered upgrading to 2.0? It really worth it…

                          Yes, I have. My other machine, a faster one, ruins hdd's. I have this machine now, and v2 does run on it, but does not perform as well as v123 does. CPU useage is substantially more with v2.

                          v2 gave me the file edit with a browse feature, so I did not need file manager with that version. Still, downloading a file from the pfsense box to my normal desktop would be a great tool to have.

                          Thanks for your efforts.

                          1 Reply Last reply Reply Quote 0
                          • M
                            mdima
                            last edited by

                            Hi Sully,
                            you're welcome, don't worry. For version 1.2.3 I need to set up a virtual machine because I don't have any box running version 1.2.3, then find an authentication function that works on both versions (1.2.3 and 2.0.1).
                            This will require some more time, I update you as soon as I have some (good) news!

                            Ciao,
                            Michele

                            1 Reply Last reply Reply Quote 0
                            • M
                              mdima
                              last edited by

                              Hi Sully,
                                ok, I made it. Now it works on version 2.0 and version 1.2.3, just tested and released.

                              Can you pls confirm everything is fine now?

                              Thanks,
                              Michele

                              1 Reply Last reply Reply Quote 0
                              • S
                                sully
                                last edited by

                                @mdima:

                                Hi Sully,
                                   ok, I made it. Now it works on version 2.0 and version 1.2.3, just tested and released.

                                Can you pls confirm everything is fine now?

                                Thanks,
                                Michele

                                AWESOME!

                                Just awesome! It works exactly as it should.

                                I cannot thank you enough for that. It was one interface feature that for myself anyway, I really wanted to have.

                                Thanks again.

                                Sul.

                                1 Reply Last reply Reply Quote 0
                                • M
                                  mdima
                                  last edited by

                                  Hi Sully,
                                    it's ok, thank you for your feedback!

                                  Michele

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.