These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for pear module configuration on the new forum.
Hi, I've used Virtualmin to install a pear module, and the VirtualMin UI indicates that the module is installed (HTTP_Request). However, my php code fails when I code against the module using the standard documented approach.
e.g. require_once "HTTP/Request.php";
$rseq =& new HTTP_Request("http://www.google.com/");
if (!PEAR::isError($req->sendRequest())) {
echo $req->getResponseBody();
My research suggests that the above code should work if the module is installed and configured properly. I have reason to believe that this is so, yet the code above still fails. I apologize if I'm missing something glaringly obvious.
P.S. I hope I've posted to the appropriate forum...
It sounds like that may be installed, but not in your application's include_path.
Details on how the include_path works is here:
http://us.php.net/manual/en/ini.core.php#ini.include-path
The two ways of handling that would be:
Modify the include_path in your $HOME/etc/php.ini file, and make sure that the include_path setup in it includes the location HTTP_Request was installed into.
Rather than using the relative path "HTTP/Request.php", you could always use an absolute path such as "/full/path/to/HTTP/Request.pm".
-Eric
Thanks! That made the difference. :)