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

What's the proper way to set up PHP bindings from a package XML?

Scheduled Pinned Locked Moved pfSense Packages
8 Posts 4 Posters 4.1k 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.
  • F
    fernandotcl
    last edited by Dec 22, 2005, 5:23 PM

    Hello,

    Let's pretend I created a package for a PHP binding to something. How would I set up PHP to recognize and load up that module? One solution would be appending some lines to php.ini (ugly!), or maybe requiring the user to use dl() to dinamically load it (ugly too!).

    I think the way FreeBSD does it is having a separate file (called extensions.ini?) so that you just appended your extension there and it'd be loaded by PHP, without the need to touch php.ini directly. Maybe the pfSense way would be having a function that you could call or a section in the package XML where you would explicitally tell pfSense you have PHP modules to install, and those would be uninstalled automagically when the package is uninstalled, without further hacks in the package XML.

    How should one procceed in such a situation right now?

    TIA.

    1 Reply Last reply Reply Quote 0
    • S
      sullrich
      last edited by Dec 22, 2005, 6:56 PM

      I'm not sure I follow.  You're speaking of PHP extensions?  Can you give me an example of one?

      1 Reply Last reply Reply Quote 0
      • F
        fernandotcl
        last edited by Dec 26, 2005, 11:07 AM

        Yeah, PHP extensions, modules, etc.. Not sure what we call them in PHP lingo.

        For example, bindings for C libraries such as MySQL, PgSQL, SDL, or anything else. Those packages are available in the FreeBSD repository (php4-pgsql, php4-mysql, php4-<put your="" favorite="" c="" library="" here="">).</put>

        1 Reply Last reply Reply Quote 0
        • S
          sullrich
          last edited by Dec 26, 2005, 10:53 PM

          Okay, with that said I guess the only real way of doing it currently is to populate the extension in php.ini.

          However, we have a statically compiled php so I am not sure if extensions are supported above and beyond the integrated php.  Would need to think all this through a little more.

          1 Reply Last reply Reply Quote 0
          • ?
            Guest
            last edited by Dec 26, 2005, 11:19 PM

            which "extensions" were you wanting specifically?

            1 Reply Last reply Reply Quote 0
            • F
              fernandotcl
              last edited by Jan 2, 2006, 11:59 AM

              @sullrich:

              However, we have a statically compiled php so I am not sure if extensions are supported above and beyond the integrated php.  Would need to think all this through a little more.

              Well, dl() works, once the library is properly installed. Thanks for the attention anyways.

              @submicron:

              which "extensions" were you wanting specifically?

              PgSQL or MySQL would be nice.

              1 Reply Last reply Reply Quote 0
              • R
                rdonnici
                last edited by Jan 4, 2006, 7:11 PM

                We were building a PGSQ package for pfsense, using dynamically loaded PHP extensions for pgsql to access the database.  However, something changed from 0.9x to BETA1, because we cannot load the extensions anymore.  There was any changes in PHP compilation/configuration between these versions?

                TIA

                Rafael

                1 Reply Last reply Reply Quote 0
                • S
                  sullrich
                  last edited by Jan 4, 2006, 7:13 PM

                  Yes, we went to a static PHP.  However, in beta2 looks like we may be back on a dynamic build.

                  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