Re: linux shared host unable to locate PEAR::Pager class in include path
| From: | Justin Patrin | Date: | Tue, 11 Jan 2005 07:11:56 +0000 |
| Subject: | Re: linux shared host unable to locate PEAR::Pager class in include path | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16871@lists.php.net to get a copy of this message | ||
On Tue, 11 Jan 2005 00:16:22 -0500, Jim MacDiarmid
<jim.macdiarmid@comcast.net> wrote:
>
> 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";
Is there a Pager/Pager.php in this directory? Perhaps you have one too
many PEAR's here?
> 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
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> !DSPAM:41e363a2260801126210593!
>
>
--
Justin Patrin