Re: include_path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 7, 2009 at 3:13 AM, Eric Lease Morgan <emorgan@xxxxxx> 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
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux