On Mon, 12 Oct 2009 16:35:11 +0200, Jeremy Clifton <[email protected]> wrote:

I'm trying to get started with Zend Framework and running into some issues. I'mworking on a virtual machine with CentOS 5.3. It's running PHP 5.3.0.

I've been following the instructions in the "Getting Started with Zend Framework 1.9"found here: http://akrabat.com/zend-framework-tutorial/ When I get to the point of testing Zend_Tool ("zf show version") I get severalthousand lines of warnings about failed includes followed by the version. For >instance:


I had the exact same problem on my Ubuntu system, and I think I solved it more by luck than judgement. So after a lot of trial and error, I can't remember *exactly* what the final answer was. However, this one was certainly important:
-----
1. The PHP include path must point to a directory called "ZendFramework/library", (and possibly also the one called "pear") which could be almost anywhere, depending on how you downloaded the framework. I eventually used synaptic to load the Zend Server Community edition, which seemed to give me a nice clean installation. On my system this put in the following line (or maybe I added it myself, I don't remember) into the php.ini file:

include_path = ".:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear"

The include_path is found in the php.ini file, which on my system is:
"/usr/local/zend/etc/php.ini"
------
2. I recursively changed the group of the directory /usr/local/zend and all its sub-files and directories to be "www-data":

"chgrp -R www-data /usr/local/zend"

but I don't know if this actually made a difference. I also changed their access permissions to 775, and put my own user into the www-data group, so I wouldn't have to become root or sudo to access things there.

"chmod -R 775 /usr/local/zend",
"useradd -G www-data my_user_name". (please check the commands, I'm working from memory here...)

This may have helped, because I was trying to create the project in my home directory, using my own username, not sudo or root.)
-------
3. I put zf.sh and zf.php into "/usr/local/zend/bin", and changed .bashrc to put this directory into my $PATH - perhaps the files were already there, but putting them in the PATH probably helped. Also I created an alias of "zf='zf.sh'" in my profile.
-------
Hope this helps, it's by no means an authoratitive answer, just some haphazard things that eventually worked for me.

-- Simon

Reply via email to