Re: include_path
| From: | 9el | Date: | Fri, 06 Mar 2009 21:19:31 +0000 |
| Subject: | Re: include_path | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289489@lists.php.net to get a copy of this message | ||
On Sat, Mar 7, 2009 at 3:13 AM, Eric Lease Morgan <emorgan@nd.edu> wrote:
>
> 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.
/usr/lib/php is not in the default scope of webroot ie. /var/www :)
You have to allow apache to access /usr/lib/php location
>
>
> 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
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>