What's the proper way to set up PHP bindings from a package XML?
-
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.
-
I'm not sure I follow. You're speaking of PHP extensions? Can you give me an example of one?
-
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>
-
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.
-
which "extensions" were you wanting specifically?
-
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.
-
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
-
Yes, we went to a static PHP. However, in beta2 looks like we may be back on a dynamic build.