PHP Interface Example¶
This project contains an example PHP project that interfaces with Soar. It includes a sample agent that is a slight modification of the water-jug-rl demo agent included with Soar. The main difference is that the initialization application and the goal-detection elaboration rules condition upon server-side input-link structures to dynamically generate water-jug problem instances.
Download Links¶
Documentation¶
For the PHP bindings to build correctly, SWIG Version 1.3.40 is required.
For Soar to interact with PHP, there are a couple of required manual steps:
-
Open
php.iniand set theenable_dl = On -
Copy (or, preferably, create a symbolic link) of
libPHP_sml_ClientInterface?.so(in lib) to the PHPextension_dir(sans the lib prefix). You can find this viaphpInfo()(search forextension_dir) orphp-config --extension-dir.
For Soar to work with Apache via PHP, there are a couple more required steps:
-
The module needs to be loaded by default. Open
php.iniand addextension=PHP_smlClientInterface.soat the end of the list of extensions. -
The SML shared library (i.e.
libSoarKernelSML) needs to be accessible to Apache. The easiest way to do this is to copy the library to system library path (i.e./usr/local/libon Linux).
Developers¶
Nate Derbinsky
Soar Versions¶
- Soar 8
- Soar 9
Language¶
PHP