The University of Queensland Homepage
UQ VisLab UQ VisLab

 Build Instructions for PHP-SRB Bindings
Linux Instructions
  • Prerequisite:
    • PHP 5.0 or later

  1. Download and extract the SRB 3.4.2 Client distribution from the SDSC page here
  2. Download and extract the PHP-SRB source code here or svn check out from here (coming soon!).
  3. 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"
  1. 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,
    1. copy srbext.so to your PHP shared library directory (e.g. /usr/lib/php/extensions)
    2. Add the line extension=srbext.so to your php.ini under the Dynamic Extensions section.
    3. 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.
    4. 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.

OS X (PowerPC/Intel) Instructions
  • Coming soon!

Windows Instructions

  • Coming soon!



- Last updated December 18, 2007 -