- Prerequisite:
- PHP 5.0 or later
- Download and extract the SRB 3.4.2 Client distribution from the SDSC page here.
- Download and extract the PHP-SRB source code here or svn check out from here (coming soon!).
- Build SRB 3.4.2 on your system.
- IMPORTANT NOTE:
To avoid conflicts with Debug declared in php.h you will need to modify two include files in the SRB 3.4.2 source - At line 312 of <the SRB 3.4.2 client directory>/src/include/srb.h and <the SRB 3.4.2 client directory>/src/include/srb.h.in:
- Change "Debug" to
"srbDebug"
- At line 25 of <the SRB
3.4.2 client directory>/src/include/dpssFileDvr.h
- Change "extern int Debug" to "extern int srbDebug"
- Go to the php-srb
directory:
- run: phpize
- run: ./configure --with-php-config=<your php-config path> --enable-srb --with-srb-dir=<the SRB 3.4.2 client directory>
- run: make
- run: gcc -shared .libs/srbext.o <the SRB 3.4.2 client directory>/utilities/obj/srbClientUtil.o <the SRB 3.4.2 client directory>/obj/libSrbClient.a -lpthread -o modules/srbext.so
- The built PHP-SRB bindings srbext.so file will be in the "php-srb/modules" directory.
- To clean, run make clean.
- To install,
- copy srbext.so to your PHP shared library directory (e.g. /usr/lib/php/extensions)
- Add the line extension=srbext.so
to your php.ini under the
Dynamic Extensions section.
- Don't forget to increase the upload_max_filesize and post_max_size in to a larger value in your php.ini if you want to upload data with the bindings.
- The bindings should be available for use after you restart the
webserver.
- To test, please see api_reference.txt
in the src package for the list of included functions (e.g.
srb_connect, srb_obj_open, srb_issue_ticket). You can also download and
extract this
PHP-SRB AJAX test page into your Apache webroot directory then open <your server
address>/SRBtest/index.php on your server. If all goes well,
you should see the listing of objects in the "Browse path" specified
location on the SRB server in an Array.
- Coming soon!
Windows Instructions
- Coming soon!
- Last updated December 18, 2007
-
