Page 1 of 1

Install Zend Framework on Apache VirtualHost

Posted: Sat Feb 07, 2009 4:40 am
by wvxvw
Hi. I'm very new to Zend Framework and to it's concepts. Tried to follow different tutorials on installation / configuration but to no avail so far...
Basically, I need this framework only to test ZendAMF module, but it requires me to have a complete installation as I've found a lot of other framework classes in dependencies...
Now the question:
I though I'd be able to configure Apache with this:

Code: Select all

Listen 8080
Listen 80
 
<VirtualHost localhost:8080>
    DocumentRoot "C:/www/zend/public"
    ServerName localhost:8080
#   ServerRoot "C:/www/zend/library"
    AccessFileName .htaccess
    DirectoryIndex index.php
</VirtualHost>
for it, because in another place it says that:
For a reference we are going to assume that your web server folder is setup in the following manor.
/data/
/public or /htdocs or /www /include/
/library/Zend/Amf/
/include/
Where the Zend Framework is placed into the /library directory
which I do have, assuming C:/www/zend/public == /public or /htdocs or /www /include/
When I try to http://localhost:8080 I'm getting to the correct index.php, so, that's also working.
What I don't understand is how is Apache supposed to find the "library" directory and make require_once understand that whatever it imports is in that directory and not relatively to the DocumentRoot? Because all the require_once calls look like this:
require_once "Zend/AMF/Whatever" (where I would expect "../library/Zend/AMF/Whatever").
I've read the VirtualHost tag description in Apache manual, but, it doesn't clarify it...
So, I'll be really grateful to hear any suggestion from you... sorry I'm not a server-side programmer... so, excuse me if this is very basic.
TIA