Ronny
After the upload I got the same message but regarding another missing file.
I don't see any require_once statements in your code here, so it's hard to be sure what the real problem is. I'm guessing you have something like
require_once 'Mail.php';
In order to require a file, you have to be aware of a few contepts.
First, the current working directory. Every time some PHP code executes, some file system path is assumed as the current working directory. You can check this with getcwd. If the file Mail.php is in the current working directory, then requiring it should work. Note that some scripts might alter the current working directory with commands like chdir.
Second, there's the include_path. When PHP runs a script, this determines where PHP will look if you require or include some file. You can check what it is with get_include_path. It may contain more than one path separated by some separator. On linux machines, the separator is a colon. PHP will check each directory in turn when you include or require a file. On my machine right now I get this:
php -r 'echo get_include_path();'
.:/usr/share/php
the .
refers to the current working directory. /usr/share/php
is a place where all kinds of libs get installed, like PEAR and PHPUnit and stuff. Note that the include_path might differ between your web server and your command line, or even between different users. If you plan to use PEAR packages, you'll probably need to make sure the PEAR directory is one of the directories in your include_path.
Thirdly, PEAR packages often depend on other PEAR packages. If you were seeing a complaint about some package not being installed, you might try including/requiring that one, too.
Rather than downloading the pear files to your 'root' directory (not sure what you mean by that), you might try something like:
$path = '/usr/share/php/PEAR'; // this should be the path where PEAR is installed in your machine
set_include_path(get_include_path() . PATH_SEPARATOR . $path);