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

    Captive portal html and images….

    Captive Portal
    7
    26
    17.0k
    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.
    • L
      lir
      last edited by

      hey guys,

      i've been using pfsense for quite a while though only now i've noticed that the captive portal doesnt show images i uploaded using the file manager.
      here is the code for the captive portal that i upload:

      Welcome to Free ISP

      logo

      Please enter your username and password to log-on to the system.

      in the file manager i made sure to upload logo.JPG (yeah i know it's caps), it looks just like that in the file manager.
      to double-check i even sshed to the system and found logo.JPG at: /var/db/cpelements/logo.JPG

      the captive portal system just doesnt display the image… no idea why.
      could anyone help?

      thanks.

      1 Reply Last reply Reply Quote 0
      • J
        Juve
        last edited by

        Have you tried to reboot ?

        1 Reply Last reply Reply Quote 0
        • L
          lir
          last edited by

          yeah i think i've booted up several times since, but, even weirder…
          i've had running until a few minutes ago BETA-2, i manually upgraded to beta4 and ofcourse rebooted...

          it didn't help to my unplesant surprise :(
          i found this thread to be somewhat related to my problem i think: http://forum.pfsense.org/index.php?topic=916.0

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

            We are running exactly this at work and it works fine….

            1 Reply Last reply Reply Quote 0
            • L
              lir
              last edited by

              well im runing "BETA4 built on Mon May 8 23:15:38 UTC 2006" (upgraded from beta-2)
              and i've shown you my html file, still it's not working.

              lets try to debug it together cause i can honestly say that something isn't right.
              here is some output i can give you off of my head:

              ls -al /usr/local/captiveportal/

              total 48
              drwxr-xr-x  2 root  wheel    512 May 16 15:22 .
              drwxr-xr-x  16 root  wheel    512 Apr 23 14:15 ..
              -rwxr-xr-x  1 root  wheel  14120 Jan  2 23:46 index.php
              -rwxr-xr-x  1 root  wheel  14120 May 16 14:28 index.php.test
              lrwxr-xr-x  1 root  wheel    27 May 16 15:22 logo.GIF -> /var/db/cpelements/logo.GIF
              lrwxr-xr-x  1 root  wheel    27 May 16 15:22 logo.JPG -> /var/db/cpelements/logo.JPG
              lrwxr-xr-x  1 root  wheel    27 May 16 15:22 logo.PNG -> /var/db/cpelements/logo.PNG
              lrwxr-xr-x  1 root  wheel    27 May 16 15:22 logo.bmp -> /var/db/cpelements/logo.bmp
              lrwxr-xr-x  1 root  wheel    27 May 14 11:40 logo.jpg -> /var/db/cpelements/logo.jpg
              -rw-r–r--  1 root  wheel  10049 Jan 15 03:33 radius_accounting.inc
              -rw-r--r--  1 root  wheel  4255 Jan 15 03:33 radius_authentication.inc

              can you check the sizes?
              like of index.php - maybe its still outdated...

              im open to try everything please.

              thanks,
              lir.

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

                I am about to reinstall the work image and see what happens.

                1 Reply Last reply Reply Quote 0
                • L
                  lir
                  last edited by

                  ok cool
                  i dont think it has anything to do with that cause i was runing beta-2 before and it didnt work either.
                  its not that the upgrade to beta-4 messed it but sure, give it a shot.

                  im waiting,

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

                    Beta2 didnt work, it was fixed after this.

                    1 Reply Last reply Reply Quote 0
                    • GertjanG
                      Gertjan
                      last edited by

                      Just hopping in here ….

                      Did a 'sync' today (after a complet new setup from a LiveCD version Beta 4) - and - again - images aren't take neither.

                      I've getting the same problem (actually - I never saw it working).

                      Tested last week already (was already on Beta 4 that date - it just came out) with a bare index.htm portal page (like the one mentionned above):
                      This was a no go - no images are shown.

                      Still, they (and the links) are present.

                      Again, I re-installed from a "CD V4" - and sync-ed.

                      A solution for me is: use a private external web site - take the link to the image 'over there', throw in the link on the portal page, authorize the IP of that web server on the corresponding Portal-Tab, and I reached my goal !

                      Can I have 'your' version  ;)

                      If not - very impressed by the product - it just rocks.

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • J
                        Juve
                        last edited by

                        I'm using beta4 like you and everything is ok, including use of HTTPS.
                        I had several problems on beta2, It couldn't display images but all my problems are gone since that time.

                        Have you monitored the filter output, nothing is blocked ? in the HTML output that you obtain in your browser all is fine ?

                        1 Reply Last reply Reply Quote 0
                        • GertjanG
                          Gertjan
                          last edited by

                          @Juve:

                          Have you monitored the filter output, nothing is blocked ? in the HTML output that you obtain in your browser all is fine ?

                          Like 'upstairs' :

                          
                          Welcome to Free ISP
                          
                          ![](pfsense.jpg)
                          
                          Please enter your username and password to log-on to the system.
                          
                          

                          The link in /usr/local/captiveportal named pfsense.jpg is present 'by default'.
                          It's point to an image that is present also (all this is a gift from the compagny ;-)).

                          IE7 doesn't show the image - just a small red cross.

                          So, about the source in my web browser - what I had in Ultra Edit showed up in ….. Ultra Edit (second window) when I asked IE7 to show me the source....

                          (Don't worry, used Firefox also).

                          What do you mean by '…monitored the filter output, nothing is blocked ?' ? Do I have to add the pfSense server Portal IP as 'accepted' ?
                          I'll try a 'permit all' on the OPT1 firewall interface - if it's that what you mean.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          1 Reply Last reply Reply Quote 0
                          • L
                            lir
                            last edited by

                            So I'm seeing that others are having this problem just as well…
                            How about we try to fix it?

                            I have the Beta4 CD right here but it's no fun re-installing.
                            I'd like to know where is the problem.

                            1 Reply Last reply Reply Quote 0
                            • GertjanG
                              Gertjan
                              last edited by

                              @lir:

                              So I'm seeing that others are having this problem just as well…
                              How about we try to fix it?

                              Urgent : Tried this morning and integrated this line :

                              It worked !!!!

                              When I converted my opther png file in jpg format - it show up also…

                              The good thing : it work - and for lir : search ! - the pb is on your side, as it was on mine. Beta 4 works (never had a doubt about it, Sullrich ;-) ).
                              The bad new : sorry about losing your time about this && I don't know what I did to make it work, normally I track changes I applied - this time I can't give a clue…

                              Anyway - one happy user here.....

                              PS: one thing : showing a preview with the "View current page" on the Captive portal setup page doesn't show any of these local images - but a try 'on the Portal side' (and that's whats count) showed them all !!!).

                              No "help me" PM's please. Use the forum, the community will thank you.
                              Edit : and where are the logs ??

                              1 Reply Last reply Reply Quote 0
                              • H
                                hoba
                                last edited by

                                I did split the installationproblems to another thread in the right board: http://forum.pfsense.org/index.php?topic=1251.0

                                PLEASE DON'T HIJACK THREADS!!! Thanks.

                                1 Reply Last reply Reply Quote 0
                                • L
                                  lir
                                  last edited by

                                  i managed to overcome the fresh install problem which was problematic by upgrading to beta-4 using the firmware upgrade
                                  on an already installed beta-4 system from fresh (it had some errors during install).

                                  so i can get on the webgui and everything but im having the exact same problems again with the captive portal not showing
                                  any images. i tried rebooting, i tried to remove all images and then reupload them… still i cant see them.

                                  any ideas please?
                                  (so now im on beta4)

                                  1 Reply Last reply Reply Quote 0
                                  • GertjanG
                                    Gertjan
                                    last edited by

                                    Try this line (the image should already be there)

                                    
                                    [![](pfsense.jpg)](http://www.pfsense.com) 
                                    
                                    

                                    No "help me" PM's please. Use the forum, the community will thank you.
                                    Edit : and where are the logs ??

                                    1 Reply Last reply Reply Quote 0
                                    • L
                                      lir
                                      last edited by

                                      thanks will do.
                                      ill report back

                                      1 Reply Last reply Reply Quote 0
                                      • L
                                        lir
                                        last edited by

                                        Okey so I'm still having the problem even with that link but I managed to over come it.

                                        here are the files…

                                        cd /usr/local/captiveportal/

                                        ls -al

                                        total 46
                                        drwxr-xr-x  2 root  wheel    512 May 24 07:34 .
                                        drwxr-xr-x  16 root  wheel    512 May 21 06:25 ..
                                        -rwxr-xr-x  1 root  wheel  14120 Jan  2 23:46 index.php
                                        lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.GIF -> /var/db/cpelements/logo.GIF
                                        lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.JPG -> /var/db/cpelements/logo.JPG
                                        lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.PNG -> /var/db/cpelements/logo.PNG
                                        lrwxr-xr-x  1 root  wheel    27 May 24 07:31 logo.bmp -> /var/db/cpelements/logo.bmp
                                        -rw-r--r--  1 root  wheel  10049 Jan 15 03:33 radius_accounting.inc
                                        -rw-r--r--  1 root  wheel  4255 Jan 15 03:33 radius_authentication.inc

                                        and here are the files on /var/db/cpelements

                                        ls -al /var/db/cpelements/

                                        total 200
                                        drwxr-xr-x  2 root  wheel    512 May 24 07:33 .
                                        drwxr-xr-x  9 root  wheel    512 May 24 07:32 ..
                                        -rw-r--r--  1 root  wheel  11359 May 24 07:31 logo.GIF
                                        -rw-r--r--  1 root  wheel  11033 May 24 07:31 logo.JPG
                                        -rw-r--r--  1 root  wheel    4880 May 24 07:31 logo.PNG
                                        -rw-r--r--  1 root  wheel  169798 May 24 07:31 logo.bmp

                                        so i figured out that i can see the file only if it's located on /usr/local/captiveportal and with no link or anything, like this:
                                        -rw-r--r--  1 root  wheel  11033 May 24 07:33 logo.jpg

                                        SO... thats the fix.

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          jeroen234
                                          last edited by

                                          thats no bug thats normal captive working
                                          if you ask for www.google.com it redirecting the www.google.com ip to youre pfsense ip until youre accepted

                                          if portal is on and you have jpg logo.jpg then all these jpg's are the same until youre cleard

                                          www.google.com/logo.jpg
                                          www.msn.com/logo.jpg
                                          www.hotmail.com/logo.jpg
                                          etc etc

                                          so you must make links to root in youre captive portal webpage

                                          will work for all the links

                                          ps.  never use uppercase in filenames (logo.JPG) webservers and webbrowsers don't like that
                                          only lowercase

                                          1 Reply Last reply Reply Quote 0
                                          • L
                                            lir
                                            last edited by

                                            you didnt understand the problem the way i presented it.
                                            i said that when i upload files it puts a link in /usr/local/captiveportal of them that points to /var/db/cpelements
                                            thats what happens when i upload images from the admin gui.
                                            this way it DOES NOT WORK. no matter if its upper case, lower case or without a case.

                                            if i try manually to ssh to the machine and leave the filename at /usr/local/captiveportal (no links), just put the actual logo.jpg file
                                            in /usr/local/captiveportal and doesnt make a link out of it then its just fine.

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