linux shared host unable to locate PEAR::Pager class in include path
| From: | Jim MacDiarmid | Date: | Tue, 11 Jan 2005 05:16:22 +0000 |
| Subject: | linux shared host unable to locate PEAR::Pager class in include path | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16869@lists.php.net to get a copy of this message | ||
Warning: main(Pager.php): failed to open stream: No such file or directory
in /home3/onliveca/public_html/test.php on line 9
Fatal error: main(): Failed opening required 'Pager.php'
(include_path='.:/home3/onliveca/public_html/pear/PEAR:/home3/onliveca/publi
c_html/pear/PEAR/pager:') in /home3/onliveca/public_html/test.php on line 9
I have a local copy of PEAR installed on my shared host, and I'm testing the
install. In my test file, test.php, I am doing the following:
<?php
$path = "/home3/onliveca/public_html/pear/PEAR";
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once("DB.php");
//$file1AbsPath = dirname(__FILE__);
//require_once($file1AbsPath.'/pear/pear/Pager/Pager.php');
require_once("Pager/Pager.php");
$db_engine = 'mysql';
$db_user = 'xxx'; //xxx'd out for security reasons.
$db_pass = 'xxx';
$db_host = 'localhost';
$db_name = 'onliveca_fscafe'; // TravelersNetwork Database.
$datasource =
$db_engine.'://'.$db_user.':'.$db_pass.'@'.$db_host.'/'.$db_name;
$db_object = DB::connect($datasource, TRUE);
// If $db_object contains an error: error and exit.
if(DB::isError($db_object)) die($db_object->getMessage());
// Instantiate a database object and connect.
$db_object->setFetchMode(DB_FETCHMODE_ASSOC);
This code will recognize the PEAR::DB classes but not the PEAR::Pager
Classes. I also tried adding the pear folders to the include_path in the
.htaccess file in public_html.
Any ideas why this isn't working? It's like it won't look in subfolders.
Thanks in advance,
Jim