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

Adding new php module with package?

Scheduled Pinned Locked Moved pfSense Packages
8 Posts 5 Posters 3.7k 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.
  • T
    tdi
    last edited by May 5, 2009, 7:09 PM

    I am struggling to find documentation on packaging system (this forum, wiki, google, pkg_mgr.xml examples, …)
    but I have to say - damn, someone should take some time to put everything in one place and make it easily understandable with some examples... I would also like to see a move from php4 to php5 some time in the near future.

    Sorry about this, I just had to let it out :) Maybe more people would write more/better packages if they had better documentation.

    I am trying to create a package and was wondering if it is possible to add a new php extension to existing pfSense system through a package installation procedure? If it is, how would I go about it?

    I am hoping people could find this package usable (as I do). What is the procedure of submitting a package hoping it would find its place in a pfSense packages list? Does it have to go through some kind of review?

    Thanks!

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by May 5, 2009, 7:59 PM

      The information about packages is fairly light…

      http://doc.pfsense.org/index.php/Developing_Packages
      http://devwiki.pfsense.org/PackageInfo

      But the developer of the package system isn't around these days, so some of the details are rather elusive

      I don't know if you can add a new PHP module or not. If you did, it would probably need to be compiled with the same platform as the pfSense version you're targeting, and be placed in the right path, such as /usr/local/lib/php/extensions/no-debug-non-zts-20020429/ - somehow after you add the module you'd have to trigger a restart of lightttpd, assuming that will work at all.

      You could pull the extensions dir dynamically from /usr/local/lib/php.ini (extension_dir= ... )

      pfSense 2.0 has moved to PHP5, but 1.2.x will likely stay on PHP4 unless some majorly compelling reason appears to change.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • C
        cybrsrfr
        last edited by May 6, 2009, 6:40 AM

        Curious what PHP module you are interested in adding?

        I understand the package system relatively well. I learned how to do it by reading the code of a simple package then I looked at more advanced packages to learn additional things.

        If you have questions I will try to answer them as time permits.

        1 Reply Last reply Reply Quote 0
        • T
          tdi
          last edited by May 6, 2009, 7:27 AM

          Guys thank you for you comments!

          We have several pf boxes acting as router/firewalls, some extended with proxy, other with various other packages.
          I would like to automatically back up their config to a remote ftp server and that is what I am writing a package for.

          I do not want to bother you with every little step I stumble upon so I will try and read more code from existing packages.
          Please let me know if you think this plugin might be useful to anyone (once I get around to make it work).

          Best regards!

          1 Reply Last reply Reply Quote 0
          • P
            Perry
            last edited by May 6, 2009, 7:48 AM

            There is at least 1 howto http://forum.pfsense.org/index.php/topic,8485.0.html
            There already exists a package for paying customer http://doc.pfsense.org/index.php/AutoConfigBackup
            @http://forum.pfsense.org/index.php/topic:

            There will be a low cost subscription available within the next month or so including things like the AutoConfigBackup, and access to paid-only content like the pfSense book. So for those desiring this without the budget for a support subscription, it is coming at a significantly lower cost.

            /Perry
            doc.pfsense.org

            1 Reply Last reply Reply Quote 0
            • T
              tdi
              last edited by May 7, 2009, 5:02 PM

              Stuck on crontab:
              I'm using function ls_setup_cron(…) and it adds necessary cron in config.xml. After that I call reload_all_sync() and /etc/crontab file is updated correctly. However, command entered in crontab is not executed ever! I have tried kill -HUP cron.pid, stopping it and starting it again but no luck... Executing command from console works OK, so syntax is good and XML is well-formed.

              Stuck on modifying config.xml:
              I found on this forum that you need to backup config and restore it (and then reboot) in order to really save changes to config.xml, but that won't do either - added cron is lost after reboot!

              What is the correct way of setting up cron tasks from package and modifying pfSense configuration (so it survives reboot)?

              Thanks.

              1 Reply Last reply Reply Quote 0
              • D
                dvserg
                last edited by May 7, 2009, 7:46 PM

                Exists cron package You can use this for work.

                SquidGuardDoc EN  RU Tutorial
                Localization ru_PFSense

                1 Reply Last reply Reply Quote 0
                • T
                  tdi
                  last edited by May 9, 2009, 3:47 PM

                  Well,

                  here it is http://www.simpa.ba/en/code/pfsense.

                  I hope someone finds it useful. Thanks everyone for your help.
                  Please let me know if it works for you (or not :))

                  1 Reply Last reply Reply Quote 0
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received