Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-17-2007, 06:26 PM
Junior Member
 
Join Date: Feb 2007
Posts: 15
Default Trying to set up i5 with Framework

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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-17-2007, 06:47 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-17-2007, 07:17 PM
Junior Member
 
Join Date: Feb 2007
Posts: 15
Default

I am going to rebuild the HTTP server first as I have noticed a couple of strange problems. Once I have cleared these up I will post the configs

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-18-2007, 02:01 AM
Junior Member
 
Join Date: Feb 2007
Posts: 15
Default i5 Configs

These are what works but I think I can cut out some of the config. I am having problems with zendcore and server status which I have logged with support.
Attached Files
File Type: zip httpd.zip (13.3 KB, 2 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-18-2007, 07:33 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2007, 03:05 PM
Junior Member
 
Join Date: Feb 2007
Posts: 15
Default Setup for directories

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');
	}
This is the same for all of the script paths I have to set. In a tutorial I am reviewing the path is set simply as 'controllers' or 'views' so I can only assume that somewhere there is a basedir value I can set which would state that all requests for these files use the base plus the next level?

Chris...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2007, 03:15 PM
Junior Member
 
Join Date: Feb 2007
Posts: 15
Default

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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-30-2007, 07:15 PM
Junior Member
 
Join Date: Apr 2007
Posts: 1
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-02-2007, 11:11 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

Quote:
Originally Posted by chris_hird View Post
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...
Actually now Zend_View will automatically render views from the views folder in a setup described here: Ben Ramsey » Blog Archive » Zend Framework View Notes

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:
$appDir Zend_Registry::getInstance()->get('applicationDirectory'); 
$this->setScriptPath($appDir DIRECTORY_SEPARATOR $request->getModuleName() . '/Views'); 
__________________
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:55 AM.