|
|||
|
Hi
I am trying to set up the Framework on a System i5 and have a lot of problems? Here is my directory structure /www /website /Application /controllers /views /models /htdocs /images /scripts /styles /library /Zend /tmp I am trying to run a sample project which is described on the IBM site but is using windows as the server. First problem is being able to set the root directories correctly when setting the controller directory I have to put the full path in which is /www/website/Application/controllers. I have to do that for all the directory paths as far as I can tell? When setting up the indexView I also have to set the path as /www/website/Application/views. What I would like to do is be able to set the base directory and build up from that? The index.php is sitting in /www/website/htdocs so I tried reference the controllers using ../Application/controllers and it doesnt work? I have also set the paths /www/website/library and /www/website/application in the php.ini file hoping this would allow the refrencing to work but it doesnt? The next problem was being able to set up the connection to the DB2 database. I get no feedback into the debugger to point me to the problems so I hope someone can help me from here? Chris... |
|
||||
|
Hi Chris,
Can you post your configuration files? It will help us determine what is wrong with the setup. SpotSec
__________________
Zym Framework - A Zend Framework extension library w/ demo app SpotSec Blog: http://spotsec.com/blog |
|
||||
|
everything looks in working order here, but I actually was talking about posting your sections where your have set include paths, controller configs, etc..
What I have done before is setting/determining a global base directory and dynamically setting include paths
__________________
Zym Framework - A Zend Framework extension library w/ demo app SpotSec Blog: http://spotsec.com/blog |
|
|||
|
I have the following set up for the directories
Directory ->Application contains folders config, controllers,views,models Directory ->htdocs contains folders images, scripts, styles Directory ->library contains folder Zend (this is the Framework) Directory tmp Contains folders cache, sessions, view_compiles The server is set to serve pages from htdocs. I did not want to have the Application in the htdocs directory so this seemed like a reasonable structure? I have the UserController.php in the Application/controllers directory and here is a piece of code where I am having to define the whole path to the view Code:
function registerAction()
{
$view = new Zend_View();
$view->setScriptPath('/www/shieldcrm/application/views');
echo $view->render('register.php');
}
Chris... |
|
|||
|
I have set up the php.ini to see the /www/shieldcrm/application in searches. This allows me to include files in the config simply by using config/DB_config.php etc... However I still have to set the scriptpaths etc to the full path ie /www/shieldcrm/application/controllers etc...
How can I set the scriptpaths to be linked to a partial url? Chris... |
|
|||
|
We too are contemplating using Zend Framework on an i5 to access a DB2 database on the i5.
Is this what you are trying to do, and have you had any luck doing it? My consultant is perplexed because Framework apparently uses "PDO_ODBC" to connect to databases, and according to the IBM RedBook, "PHP: Zend for i5/OS" "PDO_ODBC" is not currently supported with DB2 for i5/OS. Have you found any workarounds for this? Thanks, Dave |
|
||||
|
Quote:
As for setScriptPath(), a relative path I think would start from your controllers directory (so '../views'). You can use get_include_path() as a lazy way for the path of the views or do something similar to this: PHP Code:
__________________
Zym Framework - A Zend Framework extension library w/ demo app SpotSec Blog: http://spotsec.com/blog Last edited by SpotSec : 05-02-2007 at 11:14 PM. |
|
|||
|
I was wondering if you guys know of any work arounds for connecting to the i5/AS400 using PDO_IBM, PDO_ODBC or db2, without purchasing db2 connect. I want to use zend's adapters, but it appears i need a license for that. ODBC Data Source Administrator shows that i have iSeries Access ODBC driver, so i think i might try to use that, but not sure how to tell PDO_ODBC to use that driver.
The client machine is running Windows XP 64 bit XAMPP 1.7.0 - so i can run PHP files locally Zend Framework 1.7.6 - Zend DB classes More Info on my problem: Why can't DB2 access be simple? - Zend Core for IBM - PHP support & tips - Zend.com Thanks for any help |
![]() |
| Thread Tools | |
| Display Modes | |
|
|