Link to home
Start Free TrialLog in
Avatar of Jeff Yarrington
Jeff Yarrington

asked on

Zend Quickstart not displaying view/scripts/guestbook/index.phtml

the url localhost/guestbook seems to be using the application/layouts/scripts/layout.phtml file but not attaching the  additional markup from application/views/scripts/guestbook/index.phtml which should be calling the database.  I don't get any errors.  It just returns the layout (see image guestbookLayout.png).  The image file "shouldLookLikeThis.png" is what it is supposed to return at this point.

I am just getting to know the MVC pattern and still don't fully understand it.

Thank for any direction you can provide User generated image User generated image
New info:

 Fatal error: Class 'Zend_Db_Table_Abstract' not found in C:\Program Files (x86)\Apache2\htdocs\quickstart\application\models\DbTable\Guestbook.php on line 4

something in the setting I guess.


Avatar of dsmile
dsmile
Flag of Viet Nam image

Have you specify path to ZendFramework core library in include_path of php.ini yet?
Avatar of Jeff Yarrington
Jeff Yarrington

ASKER

No, not yet.  I'm set up on a windows machine.  Would I do that with every project that has it's own Zend Framework library?
Path to ZendFramework (ZF) should be in include_path of PHP for projects that are on the same server and share the same ZF version.

If you want each project to have its own ZF library then you only need to temporary add it on each use by placing this line on the first line of index.php (of each project)

ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/path/to/zend/framework');

Eg:

<?php
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/path/to/zend/framework');

What this line of code does is to add '/path/to/zend/framework' to current include_path of PHP
I added the include path and it did make a difference in that my var_dump in the Zend framework files work now but it didn't resolve adding the view script to the layout script is what it seems like it should be doing but is not.  Still no errors.
ASKER CERTIFIED SOLUTION
Avatar of Jeff Yarrington
Jeff Yarrington

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No one solved any part of my problem except for my self.