Jeremy Clifton wrote:
Simon,
Thanks for your response!
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"
On Monday after sending my initial message, I found Ralph Schindler's
blog post re: the ZF Pear channel and installed it that way ... and I'm
still getting the same errors. That should eliminate any include_path
issues since I know Pear is in my include path.
I'm leaning towards doing the Zend Server CE installation ... will
probably try that next.
------
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.
I checked these as well ... everything looks good. I'm a bit loathe to
monkey with the Pear installation too much though. I did, though, end up
having to create a symlink to zf.php in /usr/bin from the Pear
installation ... the zf.sh there wasn't finding it on its own.
Best,
Jeremy
-------
Jeremy Clifton <[email protected]>
4-8-4 Software Works
(423) 240-4512
Have you disabled selinux? that causes a lot of issues with paths and
includes (and is on by default with a CentOS install)