1 PEAR integration notes.
3 These notes explain how PEAR and its modules were integrated in Anuko Time Tracker project.
5 PEAR packages can be downloaded from http://pear.php.net/packages.php
6 (click on the package group, then package name, then Download link).
7 For example, for PEAR it will be http://pear.php.net/package/PEAR/download
12 - Download PEAR package from http://pear.php.net/package/PEAR/download
13 - Extract the files (what is in the deepest PEAR-1.9.1 folder) into WEB-INF/lib/pear/ folder in Time Tracker, so that you have something like:
25 and others in your WEB-INF/lib/pear/ folder.
30 NOTE: currently we are trying migrate from the old DB package to a newer MDB2 package.
31 This is why we have (temporarily) both of them here.
32 When the migration is finished the DB module will be removed.
35 - Download DB module from http://pear.php.net/package/DB/download
36 - From archive DB-1.7.14RC1.tgz take "DB.php" file and DB folder and put them into WEB-INF/lib/pear
39 - Download MDB2 module from http://pear.php.net/package/MDB2/download
40 - From archive MDB2-2.5.0b3.tgz take "MDB2.php" file and MDB2 folder and put them into WEB-INF/lib/pear
42 MDB2_Driver_mysql package
43 - Download MDB2_Driver_mysql module from http://pear.php.net/package/MDB2_Driver_mysql/download
44 - From archive MDB2_Driver_mysql_1.5.0b3.tgz merge the content of MDB2 folder with your WEB-INF/lib/pear/MDB2
45 (a collection of mysql.php files organized in a directory structure).
47 If you need Time Tracker to work with non mysql data sources install additional MDB2 drivers
48 (similarly to MDB2_Driver_mysql).
53 - Download Net_SMTP module from http://pear.php.net/package/Net_SMTP/download
54 - From archive Net_SMTP-1.4.2.tgz take the "SMTP.php" file and put it into WEB-INF/lib/pear/Net(you will need to create the Net folder).
59 - Download Net_Socket module (dependency of Net_SMTP) from http://pear.php.net/package/Net_Socket/download
60 - From archive Net_Socket-1.0.9.tgz take the "Socket.php" file and put it into WEB-INF/lib/pear/Net folder.
65 - Download Mail module from http://pear.php.net/package/Mail/download
66 - From archive Mail-1.2.0.tgz take "Mail.php" file and Mail folder. Put them in WEB-INF/lib/pear folder.
68 Now we have PEAR, and PEAR DB, PEAR MDB2, PEAR Net_SMTP, PEAR Mail modules installed.
72 Add this line to any place in config.php.dist to set PHP include path for PEAR and its modules:
74 set_include_path(realpath(dirname(__FILE__).'/lib/pear') . PATH_SEPARATOR . get_include_path());
76 Note: it is important to include realpath(dirname(__FILE__).'/lib/pear') first to eliminate any potential
77 PEAR compatibility issues for systems where another version of PEAR may be installed (like SME Server 8.0).