|
|||
|
Hi everybody,
I need to run a website that is build on the Zend Framework on a webserver that already hosts a few sites. The problem is i can not change the DocumentRoot in the httpd.conf file of this server and i can't get the site to work correctly if the DocumentRoot is not set to the public folder of the website. I removed all the .htaccess files but this does not seem to solve my problem. Is there a way to change the DocumentRoot and still use the Zend Framework. I just want to manually navigate to the public folder via the browser, but this results in a partially rendered website. How can i solve this problem ? Thanks in advance for any help you can give me! |
|
|||
|
If you are able to, I would switch hosting plans to something that offers more flexibility, but if you aren't interested in that, you are still in luck. The application and library folders can both be in your public folder. They just don't recommend it for security purposes.
This is all handled in your bootstrap file. Please look at this tutorial for more guidance: Akra’s DevNotes Tutorial: Getting Started with the Zend Framework Download the PDF tutorial and read through it a bunch of times until it starts to make sense. The Zend Framework application made in this tutorial is contained within the "zf-tutorial" folder, so all of the files needed exist in the public folder. Here is the boostarp file Akra uses in the tutorial. Notice how he defines the path to the Controller: PHP Code:
PHP Code:
PHP Code:
|
|
|||
|
Maybe a bit late, but the tutorial you refer to is actually the one i used. Those options are not strange to me, but it still does not work. This website i am doing is an internal web application so i can change just about anything i want in the webserver. I also thought it could have something to do with the htaccess files. Do you, or somebody else, have another idea how to solve this problem.
EDIT: I found out it has something to do with the including of the css, img, js, etc files. I still cannot figure out how to get around this though. I use getcwd() to determine the current directory i am in and this seems to work fine for the css files but the javascript files give me nothing but headaches. What could cause this behaviour ? Last edited by TB191 : 03-10-2008 at 02:41 PM. |
|
|||
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|