Re: newbie: pear, include_paths and require_once.

From: Date: Thu, 13 Nov 2003 14:11:35 +0000
Subject: Re: newbie: pear, include_paths and require_once.
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8888@lists.php.net to get a copy of this message
Hi Martin, I'm still a little confused. I know how to use .htaccess files to set the include paths, but I don't know how find the actual path to PEAR. If I use pico in the terminal I get this: // contents of usr/local/php/lib/php Archive HTTP.php OS XML extensions Console Mail PEAR build pearcmd.php
DB			Mail.php		PEAR.php        data		test
DB.php		Net			System.php      doc
Now, am I right in thinking that the 2 lines: require_once("Mail.php") require_once("DB.php") Are referencing the 2 files with the same name(s) above and not files that are contained in the acutal PEAR directory ?? If that's the case then I think I've been worrying about nothing. So, my .htaccess file should be fine if it's like this: php_value include_path".:/usr/local/php/:/usr/local/php/lib/php/PEAR" php_value register_globals "off" If I have that in my root directory, will my require_once("Mail.php"); work fine and know where to look fo the files ??? ?? ? Thanks again, Jon jon bennett | jon@jben.net new media designer / developer _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: http://www.jben.net/ On 13 Nov 2003, at 13:20, Martin Jansen wrote:
On Thu Nov 13, 2003 at 12:0136PM +0000, Jon Bennett wrote:
I'm trying to go through a book I bought (php/mysql programming - problem design solution Wrox press (now apress)) and it seems to want me to include (using require_once) different files from the PEAR libs. I'm running php4.3 so these libs should be installed as standard ?????
PEAR should be part of PHP, yes.
If I put a phpinfo page on my local server I can find no references to PEAR anywhere, but the book requires a .htaccess file to setup include paths to various classes etc and the location of PEAR on the server. do I still need to put an explitict include_path to the PEAR libs or is this line of code now redundant ???
You need to set the include_path. Ini_set() is the function you are searching for. --
    - Martin                           Martin Jansen
                            http://martinjansen.com/


« previous php.pear.general (#8888) next »