include_path
| From: | Eric Lease Morgan | Date: | Fri, 06 Mar 2009 21:13:40 +0000 |
| Subject: | include_path | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-289488@lists.php.net to get a copy of this message | ||
My initial PHP script is not recognizing the values in my include_path. Why?
I compiled and installed PHP yesterday:
$ php -version
PHP 5.2.9 (cli) (built: Mar 5 2009 15:33:55)
I then installed a PHP script whose beginning looks like this:
// Require System Libraries
require_once 'PEAR.php';
require_once 'sys/Interface.php';
require_once 'sys/User.php';
When I fire up this script I get the following error:
Warning: require_once(Smarty/Smarty.class.php)
[function.require-once]: failed to open stream: No such file or
directory in /var/www/html/web/sys/Interface.php on line 21
Fatal error: require_once() [function.require]: Failed opening
required 'Smarty/Smarty.class.php'
(include_path='.:/usr/lib/php') in
/var/www/html/web/sys/Interface.php on line 21
Ironically, Smarty/Smarty.class.php IS located under /usr/lib/php. So is
PEAR.php.
Why can't my PHP script find Smarty/Smarty.class.php when it is located in
my path, especially if it finds PEAR.php? How do I diagnose this problem?
--
Eric Lease Morgan
University of Notre Dame