[thelist] installing Zend Framework

Jon Molesa rjmolesa at consoltec.net
Fri Nov 7 19:54:17 CST 2008

> I've installed the library folder in /usr/share/Zend/
> Updated PHP's include_path to .:/usr/lib/php:/usr/local/lib/php:/home:/usr/share/Zend/library

I see now.
> I have a page that starts off with:
> 	include_once('/Zend/Loader.php');
include_once('Loader.php'); should work due to how you have your include
path declared.  The first forward slash in include_once('/Zend/Loader.php'); 
tells PHP to look for Loader.php in the folder 'Zend' below the root.
Since you have it set as /usr/share/Zend/library a relative declaration
of include_once would work.

see: http://us2.php.net/ini.core

  include_path  string

    Specifies a list of directories where the require(), include(),
fopen(), file(), readfile() and file_get_contents() functions look for
files. The format is like the system's PATH environment variable: a list
of directories separated with a colon in Unix or semicolon in Windows.

    Example #1 Unix include_path


    Example #2 Windows include_path


    Using a . in the include path allows for relative includes as it
means the current directory.

since you're using include_path see:

> 	//I've also tried it without the / in front of the Z.
> 	Zend_Loader::registerAutoload();
> And it generates the following errors:
> Warning: include_once(/Zend/Loader.php) [function.include-once]: failed to open stream: No such file or directory in /home/mckimmey/public_html/search_new.php on line 2
> Warning: include_once() [function.include]: Failed opening '/Zend/Loader.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home:/usr/share/Zend/library') in /home/mckimmey/public_html/search_new.php on line 2
> Now, the path to the loader.php file is /usr/share/Zend/library/Zend/loader.php
> so I don't understand why it's not finding it.
> Also, just in case it makes a difference, the server is running CentOS Enterprise 4.7, WHM/cPanel 11.3, and PHP 5.2.6
> Does anybody have any insight into this one?
> -jeremy
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 

Jon Molesa
rjmolesa at consoltec.net
if you're bored or curious

More information about the thelist mailing list