System requirements ------------------- phpannodex has been tested specifically for the following versions of PHP and Apache, but should work with any PHP 5 and Apache 2. This installation, relying as it does on make, is tailored for *nix systems. * PHP 5.0.5 * Apache 2.0.55 * libannodex PHP4 ---- If you wish to use phpannodex with PHP4, then you can do so by installing only the phpannodex core. It is the phpannodex wrapper classes that require PHP5. Installing just the core will allow you to use libannodex functions directly from PHP. Their behavior is identical to the libannodex functions, with two exceptions: *The functions will return TRUE and FALSE to indicate success and failure. *anx_write_output() does not take a memory buffer argument, and returns the data (that the libannodex anx_write_output() writes to the buffer) directly. By using phpannodex this way you miss out on the object-orientation and convenience that the classes provide. What does it do? ---------------- phpannodex is an extension for PHP that provides object oriented PHP wrappings for libannodex, a C library for manipulating Annodex media. For more details about the annodex format, see http://www.annodex.net/ phpannodex consists of two main parts. The phpannodex core is a set of C functions that wrap around the libannodex functions and make them visible to PHP. The phpannodex classes are PHP5 classes that provide an object oriented API for dealing with the phpannodex core. Building and installing ---------------------- This install process makes use of the "pear" install tool. If you don't have it, skip to the manual installation section. From the root directory of the tarball/the trunk or tag directory: * "make" * "make install" with root permissions * add the line "extension=phpannodex.so" to your php.ini file. * restart Apache This will install the phpannodex extension core and the phpannodex wrapper classes. To check that the core has been successfully installed, you can copy /Tests/phpannodex_test.php to a web-accessible directory and load it in your browser. It reports which core functions are available and which constants are defined. Note that you should not call these functions directly; the phpannodex classes will call them for you. For those wishing to install just the phpannodex core, such as php4 users: * "make" * "make install_core" with root permissions. Manual installation ------------------- * cd to src directory * "phpize" * "./configure" * "make" * "make install" with root permissions. * add the line "extension=phpannodex.so" to your php.ini file. * restart Apache The phpannodex core is now installed. * Copy the phpannodex directory into php's include directory, probably /usr/local/lib/php/ If you are installing from svn, take care not to copy the .svn directories across. The phpannodex classes are now installed.