I think in this case, a relative path such as Archive/Tar.php will be assumed that Archive is in the PEAR installation directory. Anytime I run PHP from a command line I always use absolute pathing.
I guess my question comes down to "What does the /usr/ in the include path mean? How does it relate to the file path (/home/user/the/rest/of/the/path) ?
Using a relative path, can you tell me if the following works?
require '../../php/Archive/Tar.php';
It looks like we need to go up two directories (from classes to user), and then traverse along the php and Archive directories.
I would suggest, however, that you use an absolute path because no resolving has to be done (making them quicker). For this, we can use the $_SERVER[‘DOCUMENT_ROOT’] variable, and then add on the relative path to the file from there. I’m not sure what you have your DOCUMENT_ROOT directive defined as, but if you echo it out, then your can just add on the necessary directories to it: